Why didn't the mail go out?

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
afwt
Forum Newbie
Posts: 15
Joined: Fri Sep 21, 2007 2:53 pm

Why didn't the mail go out?

Post by afwt »

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).
User avatar
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?

Post by Chris Corbyn »

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).
Check the log:

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();
Post Reply