Page 1 of 1

PHP Mail

Posted: Thu Aug 31, 2006 1:47 am
by vivekjain
Hi,
I am using the PHP mail function to send mails. The mail that is sent is a HTML mail. Few of the mail clients, shows the mail in the correct format, and few other mail clients it shows in a distorted format.
The codes that we use:

Code: Select all

$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "To: " . $u_name  . "< " . $u_email . "> \r\n";
$headers .= "From: Admin <info@admin.com> \r\n";
The output on one of the email clients

Code: Select all

X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on 
	ars4.soho.aussiehq.net.au
X-Spam-Level: 
X-Spam-Status: No, score=-5.8 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00,
	HTML_30_40,HTML_MESSAGE,MIME_HTML_ONLY autolearn=ham version=3.0.4


<html><body><p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Dear Administrator, <br>
Any help on this would be appreciated.

Thanks

Posted: Thu Aug 31, 2006 2:25 am
by alex.barylski
Look into using SwiftMailer or phpMailer I'm betting it's something in your headers your doing wrong...it's easier to use a class and let worry about those details...

Cheers :)