Connecting Tech Pros Worldwide Help | Site Map

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

Chuck W1CEW
Guest
 
Posts: n/a
#1: Mar 25 '08
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 <www@domainname.com>' . "\r\n";
$subject = 'Your posted message';
mail($to, $subject, $message, $headers);
AnrDaemon
Guest
 
Posts: n/a
#2: Jun 2 '08

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


Greetings, Chuck W1CEW.
In reply to Your message dated Tuesday, March 25, 2008, 22:54:40,
Quote:
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...
Quote:
Double line spaces
Quote:
that appear
Quote:
like this in the body.
Quote:
-Chuck
Quote:
$message ='Dear ' . Trim($fullname) .',
Thank you for your interest in our product.
Quote:
Blah blah blah blah blah
Quote:
Sincerely,
Quote:
Joe Schmoe';
Quote:
$headers .= 'From: Web server <www@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 <anrdaemon@freemail.ru>

Closed Thread