Re: mail() function on Windows (WAMP Server)

From: Date: Thu, 06 Jan 2011 21:08:10 +0000
Subject: Re: mail() function on Windows (WAMP Server)
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-310536@lists.php.net to get a copy of this message
On Thu, Jan 6, 2011 at 16:02, David Armstrong <darmstrong562@gmail.com> wrote: > I modified the php.ini in both the apache/bin directory, and also the php > directory. > Is there some way to get a trace of the code execution?  The SMTP log files > are completely worthless.  They do not show any sort of connection attempt. >> Per list rules, please hit "reply-all" and post your response >> below the quoted email in the future. Thanks. You can do a debug_print_backtrace()[1] call right after the call to mail(), or you can use a profiler like Xdebug[2]. You can also check the Apache error log to see if anything popped up. It'll be more helpful if you have error_reporting set to E_ALL, mind you. If you just want to see if mail() is encountering any errors itself, wrap the call in an if condition block: <?php if (!mail($to,$subject,$body,$headers)) { die('Call to mail() failed in '.__FILE__.'#'.(__LINE__ - 1).'.'.PHP_EOL); } ?> -- </Daniel P. Brown> Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/

« previous php.general (#310536) next »