Email Help

[size=12pt]Iam in need of some help. I have a website and done some testing on the emails. The emails will send out but, It will not send out normal. It puts all the wording into one big paragraph. Need it laid out nice and neat.

ie:
this is line one\nthis is line two

when what I want is:
this is line one
this is line two

how do I fix this?

Hi there,

Make sure you are using double-quotes around the email message that contains the \n. You need the double-quote literal for PHP to parse the \n as well as any other special notations you may want to use like \r, \t, etc.

Hope this helps.

These are the three examples how you can achieve what you want

echo 'This ', 'string ', 'was ', 'made ', ‘with multiple parameters.’, chr(10);
echo 'This ’ . 'string ’ . 'was ’ . 'made ’ . ‘with concatenation.’ . “\n”;

echo <<<END
This uses the “here document” syntax to output
multiple lines with $variable interpolation. Note
that the here document terminator must appear on a
line with just a semicolon. no extra whitespace!
END;

Hope this will help you

Sponsor our Newsletter | Privacy Policy | Terms of Service