1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00
Files
archived-php-src/ext/standard/tests/mail/bug47983.phpt
T
Christoph M. Becker 6983ae751c Fix #47983: mixed LF and CRLF line endings in mail()
Email headers are supposed to be separated with CRLF.  Period.
2020-04-02 14:51:14 +02:00

18 lines
363 B
PHP

--TEST--
Bug #47983 (mixed LF and CRLF line endings in mail())
--INI--
sendmail_path={MAIL:bug47983.out}
--FILE--
<?php
var_dump(mail('user@example.com', 'Test Subject', 'A Message', 'KHeaders'));
$mail = file_get_contents('bug47983.out');
var_dump(preg_match_all('/(?<!\r)\n/', $mail));
?>
--CLEAN--
<?php
unlink('bug47983.out');
?>
--EXPECT--
bool(true)
int(0)