xref: /PHP-8.2/ext/standard/tests/mail/gh8086.phpt (revision cc931af3)
1--TEST--
2GH-8086 (Mail() function not working correctly in PHP 8.x)
3--INI--
4sendmail_path={MAIL:gh8086.out}
5mail.mixed_lf_and_crlf=on
6--FILE--
7<?php
8var_dump(mail('user@example.com', 'Test Subject', 'A Message', 'KHeaders'));
9$mail = file_get_contents('gh8086.out');
10var_dump(preg_match_all('/(?<!\r)\n/', $mail));
11?>
12--CLEAN--
13<?php
14unlink('gh8086.out');
15?>
16--EXPECT--
17bool(true)
18int(5)
19