You are here: Re: the mail() example on www.php.net seems to be broken « PHP Programming Language « IT news, forums, messages
Re: the mail() example on www.php.net seems to be broken

Posted by Erwin Moller on 05/17/06 11:40

lawrence k wrote:

>
> I needed a simple way to send out some mail, so I went to www.php.net
> and copied their example code:
>
> http://us3.php.net/manual/en/function.mail.php
>
> The form I used to compose the email was different from the php.net
> example, but in terms of formatting the headers, the code is nearly
> identical:
>
> $headers = 'MIME-Version: 1.0' . "\r\n";
> $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
> $headers .= "From: $returnAddress \r\n" ;
> $success = mail($thisEmail, $emailSubject, $emailMainContent,
> $headers);
>
>
> I sent this out. But several (not all) of the receipents tell me that
> instead of HTML mail, they got mail with visible <br> tags

Hi,

That is hard to tell without knowing the content of $emailMainContent.
Maybe you changed somewhere in the process the content?
Maybe htmlentities() ?

Also, have a look at www.phpclasses.org and search for helperpackages for
sending HTML-mail.

Regards,
Erwin Moller

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация