|
|
 |
Re: FN-FORUM: Email problems in PHP
date posted 7th September 2007 00:29
Hi - I'd rather use this class instead
http://www.phpguru.org/static/mime.mail.html
James Herrington wrote:
>
> Hi all,
>
> I'm having a few problems sending out HTML emails in php. I have the
> HTML message stored in a variable which I then perform the
> chunk_split() and base64_encode() functions on. I then send the email
> using the mail() function. The email I receive is appearing perfectly
> however the client is telling me that they receive the following text
> in the email:
>
> The email client they are using is Apple Mail and as a result I can't
> test it. Does anyone know what might be causing this? The code to send
> the email is below.
>
>
> $mailTo = [EMAIL REMOVED]
> $messageSubject = 'blah blah blah;
> $headers = "From: ".$memberEmail." \r\n";
> $headers .= "Reply-To: ".$memberEmail." \r\n";
> $headers .= "MIME-Version: 1.0\r\n";
> $headers .= "Content-Type: text/html;
> charset=ISO-8859-1\r\n" . "Content-Transfer-Encoding:
> base64\r\n\r\n";
> $mailBody = chunk_split(base64_encode($messageBody));
> mail($mailTo, $messageSubject, $mailBody, $headers);
>
> Thanks in advance for any help,
> James
>
|
 |
|