Re: Re: sending email with linefeeds

From: Date: Fri, 06 Sep 2002 16:22:12 +0000
Subject: Re: Re: sending email with linefeeds
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-115513@lists.php.net to get a copy of this message
I spent a LOT of time several moths back trying to figure this one out. It worked fine in Outlook Express, but in Outlook, the whole message appeared on a single line. It only happened when my client filled out the form from a Mac, which turned out to be the important clue. The trick ended up being to remove all the carriage returns from the body of the email. Just like you, I played with lots of different mime type headers, and tried to copy message source headers line by line, tab by tab, etc. If was very frustrating. Don't know why exactly, but my theory was that if Outlook saw any carriage returns, it displayed it as html formatted, which made it all show up on one line. Here's my code (it's in Perl, but you can adjust it to PHP simply), which simply removes all carriage returns and replaces them with nothing in the body of the message to be sent. $FORM{'Message'} =~ s/\r//g; HTH, Peter Janett New Media One Web Services ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ New Upgrades Are Now Live!!! Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1 Sun Solaris (UNIX) accounts - PHP 4.1.2, mod_perl/1.25, Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PostgreSQL coming soon! http://www.newmediaone.net webmaster@newmediaone.net (303)828-9882 ----- Original Message ----- From: "Erwin" <erwin@isiz.com> To: <php-general@lists.php.net> Sent: Friday, September 06, 2002 9:20 AM Subject: [PHP] Re: sending email with linefeeds > Kai Hinkelmann wrote: > > Hi, > > > > we are sending plain-text-emails from php not using the mail-command > > but with port-operations. Everything works fine BUT outlook 2000 eats > > the linefeeds. We tried several things: copying the header from an > > original (functional) email from outlook, sending with \n or \r\n to > > seperate header-info and so on... nothing works. > > > > All email-clients show the mails correct - outlook 2000 doesn't. > > Since other mails are shown correct, there MUST be a way, but we > > don't know, which. > > > > Who can help? > > Please paste a generated mail message (including header information), so we > can have a look at it... > > Grtz Erwin > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#115513) next »