1--TEST-- 2Test mail() function : variation force extra parameters 3--INI-- 4sendmail_path="cat > /tmp/php_test_mailVariation2.out" 5mail.force_extra_parameters="-n" 6mail.add_x_header = Off 7--SKIPIF-- 8<?php 9if(substr(PHP_OS, 0, 3) == "WIN") 10 die("skip Won't run on Windows"); 11?> 12--FILE-- 13<?php 14/* Prototype : int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]]) 15 * Description: Send an email message 16 * Source code: ext/standard/mail.c 17 * Alias to functions: 18 */ 19 20echo "*** Testing mail() : basic functionality ***\n"; 21 22 23// Initialise all required variables 24$to = 'user@company.com'; 25$subject = 'Test Subject'; 26$message = 'A Message'; 27$outFile = "/tmp/php_test_mailVariation2.out"; 28@unlink($outFile); 29 30var_dump( mail($to, $subject, $message) ); 31echo file_get_contents($outFile); 32unlink($outFile); 33 34?> 35===DONE=== 36--EXPECTF-- 37*** Testing mail() : basic functionality *** 38bool(true) 39%w1%wTo: user@company.com 40%w2%wSubject: Test Subject 41%w3%w 42%w4%wA Message 43===DONE=== 44