Trace sent emails?


#1

I have a website which sends out emails using php/codeigniter. I know it’s basically working as most of the emails appear to be getting to their destinations. A few have been caught up in peoples Spam folders, and a few seem to have just gone missing completely.

I’ve written a mail queue system which keeps track of mails sent and checks against my outgoing quota (200 per hour I think?) to ensure I don’t exceed that.

I log the ‘mail send status’ from the codeigniter email->print_debugger() method, and from what I can see the mails are being sent correctly, but are disappearing somewhere after that.

Is there any way I can trace their progress? See smtp logs from the dreamhost server for my mails? Anything like that to help diagnose why some emails are not arriving?


#2

I assume you are sending mail FROM someuser@yourdomain.com. If not, that’s most likely your issue.


#3

Yes. All the mails go out with a from address on my domain. That email address is setup in the dreamhost mail panel to forward incoming mails to another of my email addresses. (And I’m not receiving any mail bounce messages in that account)

Most of them are getting through okay, but a number -seem- to be disappearing, I’ve asked people to check Spam folders, and a few were there but a number are still outstanding (a small percentage I think, but enough that I’d like to try to trace what’s happening).

One chap in particular never seems to receive mails from the site, although I’ve emailed him directly from the same domain, different email address, via DH webmail and he received that email.


#4

The next question to ask is there a common denominator with the domains that are being sent to… domains in the past that have been problematic off the top of my head are gmail, aol, yahoo, comcast, and i’m sure there are a few more.

Also you can send yourself an email from the site to determine the originating IP from the extended headers and then use a tools site such as mxtoolbox.com to check blacklists.

You have to understand that dreamhost originates your mail differently when you send from your domain via a standard mail client or webmail, than it does when a script generates mail from your webserver (specifically the originating IP is different).

If you find out your webserver is on a blacklist or 2 there are about 3 options you can work with. 1) ask support to move you to a different webserver that isn’t on blacklists. 2) work with support to get blacklists cleared, 3) configure smtp to that your mail originates from dreamhosts mail servers rather than the webserver.


#5

The one chap who never gets the emails is at sc.rr.com. I’ll have to collect more data from users to establish if there’s a pattern.

I’ll look into your blacklist suggestion, many thanks!