You are here: Re: mail() returns false but mail is sent « PHP Programming Language « IT news, forums, messages
Re: mail() returns false but mail is sent

Posted by Pedro Graca on 01/12/06 00:17

Geoff Berrow wrote:
> My test script is very basic.
>
> <?php
> // The message
> $message = "Line 1\nLine 2\nLine 3";
> // Send
> if(mail('bl@*****.co.uk', 'My Subject', $message, 'From:
> <bl@*****.co.uk>')){
> echo "mail sent";
> }
>
> else{
> echo "mail not sent";
> }
> ?>
>
> Mail is sent but the screen says mail not sent. Tested on another
> server and it works just fine.

What operating system is the script running on?

What are the mail configuration settings?

Don't copy them from php.ini; run this script instead:
<?php
$opts = array('SMTP', 'smtp_port', 'sendmail_from', 'sendmail_path');
foreach ($opts as $opt) {
echo $opt, ': [', ini_get($opt), "]<br/>\n";
}
?>

--
Mail to my "From:" address is readable by all at http://www.dodgeit.com/
== ** ## !! ------------------------------------------------ !! ## ** ==
TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>)
may bypass my spam filter. If it does, I may reply from another address!

 

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

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