PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
line feeds in text mail

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Mail
View previous topic :: View next topic  
Author Message
sjefjans



Joined: 08 Jan 2010
Posts: 3

PostPosted: Fri Jan 29, 2010 3:45 pm    Post subject: line feeds in text mail Reply with quote

I try to break up my plain text but \r\n doesn't do anything.

Here is a short piece of my code:

$message .= "Als u geen kansen wilt missen, gaat u naar\r\n";
$message .= "Met vriendelijke groeten,\r\n";
$mail = Mail::factory("mail");
$mail->send($to,$this->headers,$message);

The plain text is displayed like:

Als u geen kansen wilt missen, gaat u naar Met vriendelijke groeten

which is not as expected! Please give me a clue on how to solve this.
Back to top
View user's profile Send private message
brennanw



Joined: 20 May 2010
Posts: 8

PostPosted: Thu May 20, 2010 11:26 pm    Post subject: Reply with quote

Many email programs (e.g. Microsoft Outlook) will automatically remove extra line breaks. Unfortunately this is set by default. When Outlook does this you will see a small message (which is easily overlooked) which states "extra line breaks removed". The only workaround that I have found is to send the email as HTML and change your line breaks to either <br> or <p>.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Mail All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement