Reply to Re: email sent by php script has empty content in Thunderbird

Your name:

Reply:


Posted by shimmyshack on 06/22/07 10:26

On Jun 22, 11:01 am, rukkie <ruk...@belgacom.net> wrote:
> Hi,
>
> I have here some strange behaviour, when sending a mail out from my
> php script. The mail is perfectly readable in MS Outlook, but has an
> empty body when reading the mail with Thunderbird (version 1.5.0.12).
> Using "View>Message source", one can see the body ...
>
> The script used is :
>
> ***********************************************************************************
> $to="xxxxxxxx@xxxxxxx";
>
> $link="http://www.yyy.zzz/test.html";
>
> $from="xxxxxxxx@xxxxxxx";
> $subject= "Test" ;
> $message = "Test Test." ."\n";
> $message .=" " ."\n";
>
> $message .="Link Test" .$link."\n";
> $message .=" " ."\n";
> $message .=" " ."\n";
>
> $headers = "From: " . $from . "\n" ;
>
> // $headers .= "MIME-Version: 1.0\r\n";
> $headers .= "MIME-Version: 1.0\n";
> // $headers .= "Content-type: multipart/mixed; charset=iso-8859-1\r
> \n";
> $headers .= "Content-type: multipart/mixed; charset=iso-8859-1\n";
>
> mail($to, $subject, $message, $headers);
> *********************************************************************************************
> Can it be that it has something to do with the MIME or content-type ?
> Or is there something wrong in the Thunderbird settings ?
>
> Any information is more than welcome ...

Outlook is probably ignoring your headers, and rendering a default, TB
does tend to trip up on oddly formatted emails.
Are you sending attachments, is there more code than you've posted?
Try removing the mime and content-type, leaving only the From or
decide if you are sending plain text, and use that instead.
see http://en.wikipedia.org/wiki/MIME#Mixed for more.
Have you considered using the class phpmailer or another prewritten
(make sure its modern and has a good rep for security) class to
prepare and send mail of different kinds?

[Back to original 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

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