By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,223 Members | 1,371 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,223 IT Pros & Developers. It's quick & easy.

How to fix mail() double line spacing in message body?

P: n/a
So, I don't quite get how to solve this. See code example below. The
basic problem is that emails that my form-to-mails generate using the
mail() function consistently put in two CR/LF's for every apparent CF/
LF. How does this happen, how to fix the...

Double line spaces

that appear

like this in the body.

-Chuck
$message ='Dear ' . Trim($fullname) .',
Thank you for your interest in our product.

Blah blah blah blah blah

Sincerely,

Joe Schmoe';

$headers .= 'From: Web server <ww*@domainname.com>' . "\r\n";
$subject = 'Your posted message';
mail($to, $subject, $message, $headers);
Mar 25 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Greetings, Chuck W1CEW.
In reply to Your message dated Tuesday, March 25, 2008, 22:54:40,
So, I don't quite get how to solve this. See code example below. The
basic problem is that emails that my form-to-mails generate using the
mail() function consistently put in two CR/LF's for every apparent CF/
LF. How does this happen, how to fix the...
Double line spaces
that appear
like this in the body.
-Chuck
$message ='Dear ' . Trim($fullname) .',
Thank you for your interest in our product.
Blah blah blah blah blah
Sincerely,
Joe Schmoe';
$headers .= 'From: Web server <ww*@domainname.com>' . "\r\n";
$subject = 'Your posted message';
mail($to, $subject, $message, $headers);
Did You tried to not put ending ."\r\n" in the $headers variable?
--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>

Jun 2 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.