Is there a way to get a string message with a reason why send() returned false (0)?
I was searching the docs, but couldn't find a way to save a message of what happened (why did sending failed).
Why didn't the mail go out?
Moderators: Chris Corbyn, General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: Why didn't the mail go out?
Check the log:afwt wrote:Is there a way to get a string message with a reason why send() returned false (0)?
I was searching the docs, but couldn't find a way to save a message of what happened (why did sending failed).
http://www.swiftmailer.org/wikidocs/v3/misc/logging
Code: Select all
$swift =& new Swift(...);
$log =& Swift_LogContainer::getLog();
$log->setLogLevel(4);
$swift->send(....);
$log->dump();