Page 1 of 1
possible to return log ?
Posted: Tue Oct 17, 2006 6:31 pm
by webstyler
Hi, really a wonderfull script
When make batch sent is possible to have in return the log of email sent and not ?
And what's happen if a batch sent is stopped for any trouble ?
thks
Posted: Tue Oct 17, 2006 6:36 pm
by Chris Corbyn
Batch won't stop for trouble. Addresses in the batch may fail but Swift just notes these failures down and carries on.
Check the contents of $swift->getFailedRecipients() *after* sending. If it's empty the SMTP server accepted all addresses for delivery. If it's got addresses in it those addresses failed.
Swift can only see what the SMTP server tells it however. Just because the SMTP server accepts the message for delivery does not guarantee it will reach the intended recipient.
Posted: Mon Apr 02, 2007 5:52 am
by anjanesh
The last line of a mai-sending-code using swiftmailer (php5 version) is
Code: Select all
$swift->batchSend($message, $recipients, new Swift_Address("mail@domain.com", "My Name"));
How do I get any sort of log from this ?
How do I know which got sent and which failed ? Anyway to pipe log to a file ?
Posted: Mon Apr 02, 2007 8:36 am
by Chris Corbyn
Code: Select all
$swift = new Swift( ... );
$swift->log->enable();
$swift->batchSend( ... );
var_dump($swift->log->getFailedRecipients());