diff options
Diffstat (limited to 'ext/standard/tests/mail/bug69874_2.phpt')
-rw-r--r-- | ext/standard/tests/mail/bug69874_2.phpt | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/ext/standard/tests/mail/bug69874_2.phpt b/ext/standard/tests/mail/bug69874_2.phpt new file mode 100644 index 0000000000..53d991a26b --- /dev/null +++ b/ext/standard/tests/mail/bug69874_2.phpt @@ -0,0 +1,43 @@ +--TEST-- +Bug #69874: Null addtional_headers does not send mail +--INI-- +sendmail_path=tee mailBasic.out >/dev/null +mail.add_x_header = On +--SKIPIF-- +<?php +if(substr(PHP_OS, 0, 3) == "WIN") + die("skip Won't run on Windows"); +?> +--FILE-- +<?php +/* Prototype : int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]]) + * Description: Send an email message + * Source code: ext/standard/mail.c + * Alias to functions: + */ + +echo "*** Testing mail() : send email without additional headers ***\n"; + +// Initialise all required variables +$to = 'user@company.com'; +$subject = 'Test Subject'; +$message = 'A Message'; + +$outFile = "mailBasic.out"; +@unlink($outFile); + +var_dump( mail($to, $subject, $message, '') ); +echo file_get_contents($outFile); +unlink($outFile); + +?> +===DONE=== +--EXPECTF-- +*** Testing mail() : send email without additional headers *** +bool(true) +To: user@company.com +Subject: Test Subject +X-PHP-Originating-Script: %d:bug69874_2.php + +A Message +===DONE=== |