xref: /PHP-8.1/ext/standard/tests/mail/bug69874.phpt (revision b5c7a83d)
1--TEST--
2Bug #69874: Null addtional_headers does not send mail
3--INI--
4sendmail_path={MAIL:mailBug69874.out}
5mail.add_x_header = Off
6--FILE--
7<?php
8echo "*** Testing mail() : send email without additional headers ***\n";
9
10// Initialise all required variables
11$to = 'user@company.com';
12$subject = 'Test Subject';
13$message = 'A Message';
14
15$outFile = "mailBug69874.out";
16@unlink($outFile);
17
18var_dump( mail($to, $subject, $message) );
19echo file_get_contents($outFile);
20unlink($outFile);
21
22?>
23--EXPECT--
24*** Testing mail() : send email without additional headers ***
25bool(true)
26To: user@company.com
27Subject: Test Subject
28
29A Message
30