Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emails sometimes get scrambled

Tags:

php

email

qcubed

Folks,

I have a PHP-based site (using the QCubed framework); as a part of the site, I have a daemon that's sending out several thousand emails a day (no i'm not a spammer, everything is opt-in :)). Emails are sent through a custom framework component; that component serves as an SMTP client. I'm using a paid SMTP gateway from DNSExit.com to get the emails actually delivered.

Those emails are simple HTML-based emails; they really have just simple links inside.

My issue is that these links sometimes (not consistently!) get scrambled during transition. Tags somehow get mixed up, and some links are non-functional in the email. The issue happens on a small percentage of all sent emails; it is not consistent (i.e. the same exact source message HTML may or may not cause the scrambling in transition).

Have any of you seen this? Any thoughts on how to troubleshoot?

like image 336
Alex Weinstein Avatar asked Mar 10 '10 05:03

Alex Weinstein


1 Answers

Is it possible that you are using temp files to create the emails (or at minimum to create the variable content)? I did something vaguely similar once upon a time. The email text was generated and written to a temp file based on the exact time in seconds. Unfortunately, when sending thousands per day, we were hitting the same second more than once (since there are only 86k seconds available). That might explain a) the small error rate and b) the apparent randomness. For troubleshooting, I'd just see if the error rate increases with the number of emails and go from there.

like image 149
MJB Avatar answered Oct 04 '22 09:10

MJB