PHP Mail

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vivekjain
Forum Commoner
Posts: 76
Joined: Thu Jan 08, 2004 12:38 am

PHP Mail

Post 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
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post 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 :)
Post Reply