You are here: Re: mail()===false but msg is sent! « PHP « IT news, forums, messages
Re: mail()===false but msg is sent!

Posted by Jasper Bryant-Greene on 07/03/05 03:05

Andy Pieters wrote:
> So what I do is (
>
> $header="header for multipart mime message";
> $body="body with multipart mime message";
> $result=mail("Name Firstname <$address>","Subject",$message,$header);
> echo ($result?"ok":"bogus");

Well, firstly your subject does not match what you're doing. PHP is
weakly-typed, so $result may be a value that evaluates to FALSE while
not actually being a boolean value.

In your subject you use the === operator to check types, but you're not
doing it in the code sample.

You should use

echo ($result === false) ? 'bogus' : 'ok';

or similar.

Jasper

 

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

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