I'm trying to send an email with PHP.
This is my code:
$subject = 'You got mail';
$message = 'This is one line.
' .
'This is another.';
mail('your@email.com', $subject, $message);
When I receive the mail, the two lines of the message body appear as one line, with the newline
given as part of the message text:
This is one line. This is another.
Why is that, and how can I get my lines to break?
Solution:
ôkio's answer is correct. But instead of using double quotes, I now use the predefined end-of-line variable:
$message = 'This is one line.' . PHP_EOL .
'This is another.';