Success / Fail Tracking
Moderators: Chris Corbyn, General Moderators
Success / Fail Tracking
I've got swiftmailer working on my machine right now, I've got the anti-flood plugin working, I'm currently only sending to a test email list of about 10 addresses. I will be using this to send a monthly newsletter out to over 5600 people, and the recipient list gets bigger every month. This is a huge part of my companies marketing, tons of money is brought in off the newsletter, so it's very important to be sure that everything works properly. What I was wondering is if there are any plugins or anything that will enable me to see the success rate of the program? Right now, I click on send to execute the script and it just runs in the background and I have no way of being sure that it's going to properly send out to everyone.
What I'm looking for is either something that will send me an email at the end of every batch with the list of who it sent it to, or perhaps one big list at the end of the process with a list of who it sent it to, etc. Or if there is even a better way of doing this that I am not thinking of, that will work too. Thanks!
What I'm looking for is either something that will send me an email at the end of every batch with the list of who it sent it to, or perhaps one big list at the end of the process with a list of who it sent it to, etc. Or if there is even a better way of doing this that I am not thinking of, that will work too. Thanks!
I think you could look in $swift->transactions to see what is going on behind the scenes... although I've only used swift for single emails, so I don't know for sure.
Also... this may be helpful: http://swiftmailer.org/docs/failures/ge ... recipients
Also... this may be helpful: http://swiftmailer.org/docs/failures/ge ... recipients
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
getFailedRecipients() can tell you what fails at SMTP-time. Tracking mail beyond the SMTP server's original conversation with Swift is never going to be perfect.
I'm reluctant to bring this up because it can so easily be abused but since it's been mentioned here's a way to (sometimes) track when a mail is opened.
Send the email as HTML, and in your HTML place your company's logo. Now, that logo has to be downloaded from somewhere -- your server. So, rather than having the image download directly, grab it via a PHP script instead like this:
Or even better, just use a unique ID which can be checked in a database for their email address. The only thing left to do now is write that script to stream and image with the correct headers and flag the email address in the database.
There's actually a plugin floating around these forums somewhere which verbosely displays pass/fail information in real-time.
I'm reluctant to bring this up because it can so easily be abused but since it's been mentioned here's a way to (sometimes) track when a mail is opened.
Send the email as HTML, and in your HTML place your company's logo. Now, that logo has to be downloaded from somewhere -- your server. So, rather than having the image download directly, grab it via a PHP script instead like this:
Code: Select all
<img src="http://yourserver.tld/images/logo.php?email=persons@email.address.tld" alt="" />There's actually a plugin floating around these forums somewhere which verbosely displays pass/fail information in real-time.
Code: Select all
<img src="http://yourserver.tld/images/logo.php?email=persons@email.address.tld" alt="" />- n00b Saibot
- DevNet Resident
- Posts: 1452
- Joined: Fri Dec 24, 2004 2:59 am
- Location: Lucknow, UP, India
- Contact:
Yeah, I'm not looking for a confirmation that the email is received or anything like that. I'm more interested in making sure that all of the emails are being sent out. Some kind of a confirmation when the script is complete that lets me know if there were any errors or issues with the batch jobs.
If there's not a good plugin out there that already does this (and is there a repository of available plugins somewhere?), I'll look at making something up that'll do something similar. Thanks again!
If there's not a good plugin out there that already does this (and is there a repository of available plugins somewhere?), I'll look at making something up that'll do something similar. Thanks again!
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Just check if getFailedRecipients() is empty or not after sending. If it's not empty then it contains addresses which failed.wselby wrote:Yeah, I'm not looking for a confirmation that the email is received or anything like that. I'm more interested in making sure that all of the emails are being sent out. Some kind of a confirmation when the script is complete that lets me know if there were any errors or issues with the batch jobs.
Sadly not at the moment no. It was supposed to go on the website a long time ago but I'm massively over-stretched at the moment with work, freelancing and another project I'm working on. We could probably make a sticky in this forum for plugins or just add them to SourceForge as downloads under new package name.If there's not a good plugin out there that already does this (and is there a repository of available plugins somewhere?), I'll look at making something up that'll do something similar. Thanks again!
Thanks for the quick replies. I really do appreciate it.
A sticky in this forum would be nice. Also, if you could get the mods to move posts about swiftmailer from the other forums into this one, so that they're all in one place, that'd rock. I understand about being busy though, so believe me, it's only a suggestion, nothing more.
I'll have a look at checking the getFailedRecipients() to see if it's empty or not and see if that works the way I want. Thanks again!
A sticky in this forum would be nice. Also, if you could get the mods to move posts about swiftmailer from the other forums into this one, so that they're all in one place, that'd rock. I understand about being busy though, so believe me, it's only a suggestion, nothing more.
I'll have a look at checking the getFailedRecipients() to see if it's empty or not and see if that works the way I want. Thanks again!