Page 1 of 1
Success / Fail Tracking
Posted: Thu Oct 12, 2006 11:11 am
by wselby
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!
Posted: Thu Oct 12, 2006 11:17 am
by Luke
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
Posted: Thu Oct 12, 2006 12:34 pm
by Chris Corbyn
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:
Code: Select all
<img src="http://yourserver.tld/images/logo.php?email=persons@email.address.tld" alt="" />
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.
Posted: Thu Oct 12, 2006 12:51 pm
by Luke
Code: Select all
<img src="http://yourserver.tld/images/logo.php?email=persons@email.address.tld" alt="" />
That's pretty cool man... I wouldn't have thought of that.

Posted: Thu Oct 12, 2006 1:18 pm
by nickvd
Yeah, that's unfortunatly the prime way that spammers confirm valid emails... it's also the prime reason why most people I know don't display images from emails unless they're expecting them (for direct to client emails it might not be a major problem as they will likely trust the sender)
Posted: Thu Oct 12, 2006 1:44 pm
by n00b Saibot
these days all major web & desktop email clients block external images except when user tells them to show them. so it might not be a great idea after all.
Posted: Thu Oct 12, 2006 1:44 pm
by wselby
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!
Posted: Thu Oct 12, 2006 1:56 pm
by Chris Corbyn
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.
Just check if getFailedRecipients() is empty or not after sending. If it's not empty then it contains addresses which failed.
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!
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.
Posted: Thu Oct 12, 2006 2:06 pm
by wselby
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!