1--TEST-- 2Test mail() function : variation force extra parameters 3--INI-- 4sendmail_path="sed > /tmp/php_test_mailVariation2.out" 5mail.force_extra_parameters="-e4a---forced-params" 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--EXPECT-- 37*** Testing mail() : basic functionality *** 38bool(true) 39To: user@company.com 40Subject: Test Subject 41 42A Message 43---forced-params 44===DONE=== 45