how to get the mailaddress which failed when use batchsend

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
binwang4463
Forum Newbie
Posts: 2
Joined: Tue Feb 10, 2009 4:47 am

how to get the mailaddress which failed when use batchsend

Post by binwang4463 »

we know batchsend can send mail to multiple recipient; but the batchsend method only return the count of the success, how can i get the recipient address which failed when batchsending?

anybody can give me some advise.


thanks!

bin,wang
from beijing,china.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: how to get the mailaddress which failed when use batchsend

Post by Chris Corbyn »

Are you using Swift Mailer version 3 or 4?

Whichever one you use, you can write a simple plugin to track sending, though the implementation differs slightly for each version.

There's also ways to get the raw list of failed recipients, but again it depends on the version you're using.

Some info for version 3 here:

http://swiftmailer.org/wikidocs/v3/send ... _t_deliver
binwang4463
Forum Newbie
Posts: 2
Joined: Tue Feb 10, 2009 4:47 am

Re: how to get the mailaddress which failed when use batchsend

Post by binwang4463 »

thanks for your information. I use 3.3.3-php5 version .

according to your tip, I have noticed that there has a getFailedRecipients() method in Swift_BatchMailer Class .

so i decide to try use Swift_BatchMailer class and it's send() method and getFailedRecipients() tonight.

before this time ,I only use swift class and it's batchsend() method .

Tomorrow , I ' ll report the result to everybody .

thank you ,Chris .
Post Reply