Sending email shoudn't be this hard!
- brad's blog
- Login or register to post comments
OK, the starting point for this post was the installation and testing of the SimplyNews module. In order to send email as HTML rather than as plain text the MimeMail module was also required. In my initial testing the MimeMail module worked fine but when I moved my test suite to the main ADETA website things quit working! What the ....!!!
After a few days of testing and tweaking and testing again it finally became clear that the MimeMail module was doing something to outgoing email that caused email servers to reject the email. In otherwords none of my test recipients were recieving the Newsletter issues. In all I had three email accounts on three different servers including Gmail from Google and none of them were receiving the emails.
I tried to debug the mimemail module but after a few attempts decided it was easier to re-write a section of the module to use another bit of mimemail code that I knew worked (see phpMailer). Actually, Mimemail uses phpMailer code but not the part that encodes mime emails.
When the MimeMail module is updated I can revisit but for now this is the quickest fix. Once I got this in place and handling the various settings things started working again and all of my email recipients were getting email in html and plain text (mime-encoded).
One the good things about a project like Drupal is that there are lots of modules to help do what you want. But, when they don't work it's sometimes way quicker and easier to fix the module yourself. The problem is that the modified module becomes increasingly difficult to upgrade ... so I'll have to watch out for this. How? That's another post.

