1--TEST-- 2Bug #69874: Null addtional_headers does not send mail 3--INI-- 4sendmail_path=tee mailBasic.out >/dev/null 5mail.add_x_header = Off 6--SKIPIF-- 7<?php 8if(substr(PHP_OS, 0, 3) == "WIN") 9 die("skip Won't run on Windows"); 10?> 11--FILE-- 12<?php 13/* Prototype : int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]]) 14 * Description: Send an email message 15 * Source code: ext/standard/mail.c 16 * Alias to functions: 17 */ 18 19echo "*** Testing mail() : send email without additional headers ***\n"; 20 21// Initialise all required variables 22$to = 'user@company.com'; 23$subject = 'Test Subject'; 24$message = 'A Message'; 25 26$outFile = "mailBasic.out"; 27@unlink($outFile); 28 29var_dump( mail($to, $subject, $message) ); 30echo file_get_contents($outFile); 31unlink($outFile); 32 33?> 34===DONE=== 35--EXPECT-- 36*** Testing mail() : send email without additional headers *** 37bool(true) 38To: user@company.com 39Subject: Test Subject 40 41A Message 42===DONE=== 43