Re: mail function problem
| From: | web2 | Date: | Tue, 03 Jul 2007 07:22:47 +0000 |
| Subject: | Re: mail function problem | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-258094@lists.php.net to get a copy of this message | ||
Daniel Brown a écrit :
On 7/2/07, web2@get-telecom.fr <web2@get-telecom.fr> wrote:I think the problem is not in the test script.Daniel Brown a écrit :On 7/2/07, web2@get-telecom.fr <web2@get-telecom.fr> wrote:Is it possible for you to provide your code so that we can take a look at it for you?HTTP/1.1" 200I've already checked : - the mail logs : no mail send - and the apache error and access logs : nothing except this : 192.168.0.1 - - [02/Jul/2007:14:07:22 +0200] "GET /~eeeeee/mail.php HTTP/1.1" 200 49291 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4" 192.168.0.1 - - [02/Jul/2007:14:07:22 +0200] "GET /~eeeeee/mail.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42(Windows;2524 "http://mysite.domain.do/~eeeeee/mail.php" "Mozilla/5.0HTTP/1.1" 200U; Windows NT 5.1; fr; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4" 192.168.0.1 - - [02/Jul/2007:14:07:22 +0200] "GET /~eeeeee/mail.php?=SUHO8567F54-D428-14d2-A769-00DA302A5F18(Windows;2813 "http://mysite.domain.do/~eeeeee/mail.php" "Mozilla/5.0HTTP/1.1" 200U; Windows NT 5.1; fr; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4" 192.168.0.1 - - [02/Jul/2007:14:07:22 +0200] "GET /~eeeeee/mail.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42(Windows;2146 "http://mysite.domain.do/~eeeeee/mail.php" "Mozilla/5.0web2@get-telecom.fr wrote:U; Windows NT 5.1; fr; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4" Chris a écrit :user),Hi, I'm running PHP 5.2.3 on Solaris 10 (AMD64). My mail function doesn't send any mail, the return value of mail function is false... But sendmail_path value is OK in php.ini, and I've tried to send a mail with sendmail on console with the same user (the apacheCheck your mail logs and your apache logs to see if any errors are showing up.and everything's ok... Does anyone have solution ?-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpYes, my PHP test code is : <? ini_set("display_errors", true); ini_set("error_reporting", E_ALL); $Email="test@zz.fr"; $headers = "From: " . $Email . "\r\nX-Mailer: PHP/" . phpversion(); if ( mail("test2@zz.fr" , "essai" , "test", $headers) ) echo "OK : ".ini_get('sendmail_path'); else echo "NOK : ".ini_get('sendmail_path'); ?>Try this: <? $email = "test@zz.fr"; $headers = "From: ".$email."\r\n"; $headers .= "X-Mailer: PHP/".phpversion()."\r\n"; if(mail("test2@zz.fr","essai","test",$headers)) { echo "OK: ".ini_get('sendmail_path'); } else { echo "NOK: ".ini_get('sendmail_path'); } ?> Note Same result : "NOK /usr/lib/sendmail -t -i"