Re: Line breaks in mail function?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2005-11-07 at 12:20 +1000, Murray @ PlanetThoughtful wrote:
> Example code:
> 
>     $body = 'From: ' . $name . '\r\n\r\n';
>     $body .= 'Email:' . $email . '\r\n\r\n';
>     $body .= 'IP Address: ' . $_SERVER['REMOTE_ADDR'] . '\r\n\r\n';
>     $body .= 'Feedback:\r\n\r\n';
>     $body .= $feedback;
>     mail("planetthoughtful@xxxxxxxxx", "Feedback", $body, "From: 
> $email\r\nReply-To: $email\r\nX-Mailer: PHP/" . phpversion());
> 
> As I said above, I've also tried using "\n\n" instead of "\r\n\r\n".
> 
> Can anyone give me some advive on how to get the linebreak characters 
> interpreted as linebreaks?

Use double quotes around the parts that have \r and \n characters if you
want them to be interpreted.

-- 
Jasper Bryant-Greene
General Manager
Album Limited

e: jasper@xxxxxxxxxxx
w: http://www.album.co.nz/
b: http://jbg.name/
p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303
a: PO Box 579, Christchurch 8015, New Zealand

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux