Return to mail_variation2.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / mail |
1.1 misho 1: --TEST-- 2: Test mail() function : variation force extra parameters 3: --INI-- 1.1.1.2 ! misho 4: sendmail_path="cat > /tmp/php_test_mailVariation2.out" ! 5: mail.force_extra_parameters="-n" 1.1 misho 6: mail.add_x_header = Off 7: --SKIPIF-- 8: <?php 9: if(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: 20: echo "*** 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: 30: var_dump( mail($to, $subject, $message) ); 31: echo file_get_contents($outFile); 32: unlink($outFile); 33: 34: ?> 35: ===DONE=== 1.1.1.2 ! misho 36: --EXPECTF-- 1.1 misho 37: *** Testing mail() : basic functionality *** 38: bool(true) 1.1.1.2 ! misho 39: %w1%wTo: user@company.com ! 40: %w2%wSubject: Test Subject ! 41: %w3%w ! 42: %w4%wA Message 1.1 misho 43: ===DONE===