Re: MAIL() help needed :-(

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Payne wrote:

I'm having a major problem.  I'm trying to send a message FROM Windows XP
Pro, now this is where it get weird - in some mail packages it WORKS, and in
some it doesn't.  Basically it's an HTML email which is sent when a form is
completed, the results are stored in a DB and then sent on in an HTML Email
Format.  In My outlook 2003, it works, in my friends outlook 2003 which I
setup for him exactly the same way mine is - the email is blank, it is the
same in his outlook express.  My question is, can anyone see anything that I
am doing wrong for this to happen?  Maybe my headers are wrong?  Any help
would be really appreciated as this is really getting to me.

Are you sure he isn't just viewing the message in plain text? Each of you view the source of the message and see if anything is different. This isn't a PHP issue, as far as I can tell.


$body_html = "$messagebody";

$body_html = $messagebody;

$headers .= "to: \"".$to_name."\" <".$to_email.">\r\n";

Don't put a To: header here. That's what the "to" parameter of mail() is for.


$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";

Not the best way to send an HTML message. It'll work on some mail clients and not on others. Best way is to send a multi-part message. Search Google for a tutorial.


--

John Holmes

php|architect - The magazine for PHP professionals - http://www.phparch.com

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux