I've seen a lot of examples using the php mail function. Some of them use rn as line break for the header, some use n.
$headers = "From: Just Men"; $headers .= "Reply-To: Just me <$email>n";
$headers = "From: Just Mern"; $headers .= "Reply-To: Just me <$email>rn";
which one is correct?
Sometimes I've had cases where rn is used and part of the header is interpreted by some email clients as mail text (losing these header information) - is this because rn is wrong?
rn, should be used according to the php documentation. Also, to conform to the RFC 2822 spec lines must be delimited by the carriage return character, CR
rimmediately followed by the line feed, LF
rnis native to Windows platforms and
nto Unix, you can use the
PHP_EOLDocs constant on Windows, which is the appropriate new line character for the platform the script is currently running on.