Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old March 25th, 2008, 07:55 PM
Chuck W1CEW
Guest
 
Posts: n/a
Default How to fix mail() double line spacing in message body?

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);
  #2  
Old June 2nd, 2008, 11:34 AM
AnrDaemon
Guest
 
Posts: n/a
Default 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>

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles