Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weird HTML Email problems...

Status
Not open for further replies.

youradds

Programmer
Jun 27, 2001
817
GB
I'm having a little problem with Email sending in PHP. For some reason, with Outlook 2001, it won't accpt the HTML email as HTML. I've got this;


Code
mail("$toemail", $subject, $saved,
"From: $email_to\r\n"
."Reply-To: $email\r\n"
."MIME-Version: 1.0\r\n"
."Content-type: text/html; charset=iso-8859-1\r\n");

I've also tried;


Code
mail("$toemail", $subject, $saved,
"From: $email_to\r\n"
."Reply-To: $email\r\n"
."MIME-Version: 1.0\r\n"
."Content-type: text/html r\n");

Has anyone had any experiences with this kind of thing? Its really weird how it works on my computer, as well as hotmail account. He has also said that he receives other HTML emails fine from other companies...its just with this code that it won't work

Andy
 
Have you tried taking out the "MIME-Version" line?

Outlook may, from the presence of the MIME-Version line, be expecting your HTML to appear in a MIME block.
 
well i have problems with e-mail. If the SMTP is windows it needs \n, if it's linux it needs \r\n, well, i don't know your case, but i can advise you to test it without the \r's.
Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
I have had problems with PHP and ASP mailing HTML absed messages. Eventually I gave up on both and wrote a Perl script to do the same thing, and for some reason it works. Go figure.

Although Perl is different from PHP, its not a difficult language to learn, and the Forum here is very helpful with it.

Good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top