Re: Mail_Mime and english/french html/text

From: Date: Thu, 07 Apr 2005 22:20:10 +0000
Subject: Re: Mail_Mime and english/french html/text
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18638@lists.php.net to get a copy of this message
On Apr 7, 2005 3:11 PM, Scott <scott.maclure@gmail.com> wrote: > hey guys, > > I'm trying to send emails with both HTML and TXT versions, which have > english and french content. > > I'm using: > > Mail 1.1.4 stable > Mail_Mime 1.2.1 stable > > What happens is, kinda funny. If I send my email in a loop (in php), > once to each recipient, they get a garbled message with the text and > html together. > > The text/html are files that are sent to me by someone else. > > If, using the same code, I send it ONCE, it works and looks just fine! > WTF. > > Anyway, I'm realising that I have little clue when it comes to > encoding. Mail_Mime sets some stuff for you: > > $this->_build_params=array( > 'text_encoding'=>'7bit', > //'text_encoding'=>'8bit', > 'html_encoding'=>'quoted-printable', > '7bit_wrap'=>998, > 'html_charset'=>'ISO-8859-1', > //'html_charset'=>'UTF-8', > 'text_charset'=>'ISO-8859-1', > //'text_charset'=>'UTF-8', > 'head_charset'=>'ISO-8859-1' > ); > > (you can see my frankenstein like attempts at getting this working in 5 > minutes or less :)) > > So, any advice for people who use PEAR to send en/fr/other language > emails around and looking funky? > > curse funny languages! bring on homogenisation, I say! > help/advice/linkage appreciated. > Well...what's your loop look like? Are you re-creating the mail message every time? You could probably get away with creating the body once and re-creating the headers with the different recipients every time. -- Justin Patrin

« previous php.pear.general (#18638) next »