When is spam not spam?
25 May 2007 — DanielMXC’s main function, of course, is to send and receive messages. It does so by a variety of methods, and one of those is email. Of course, email is not the most reliable of transmission methods, and we at eVision generally recommend using other, more reliable transmission protocols, particularly for important feeds.
But email remains important, particularly when interfacing to legacy systems… including humans, some of whom live and breathe email.
Recently I found some emails were going missing. As far as our software was concerned, they’d been sent, but they never showed up at their destination. Every night this particular installation was meant to send an attached plain text file, though it wasn’t a TXT file; it was named as a DIS file. It only seemed to go missing on weekends, when there was little activity for the client, and therefore the emailed file would contain just a header and trailer. (This varies widely according to the interfacing system, of course, with MXC configurable to send in the precise format expected at the other end.)
To troubleshoot, I did some testing of my own, replicating as far as possible the conditions in which the emails went missing. And I managed to replicate the problem.
Looking “under the hood”, I isolated the specific code which sent the email, and tried that on its own. Sure enough, the emails didn’t arrive. But more mysteriously, when changing the filename from a DIS file to a TXT file, it did get delivered. Weird.
I did some more wrangling with the code, even trying out an alternative mail library, but the same thing every time. The almost-empty DIS file didn’t get delivered, but if it had a bunch of content in it (as per a busy day on the system) or was a TXT file, it would get through.
Asking around, someone suggested what probably should have been obvious to me all along: what if Outlook (which was being used in my tests as the recipient, and the client also used) thought it was spam? Check the Junk Mail folder!
I did so, and found the missing messages. The client also found them in their Junk Mail folder. ‘Twas but a minute’s work to add the MXC Sender to the Safe Sender’s list in Outlook, and everybody was happy again.
Something to keep in mind the next time system-generated emails aren’t showing up.
