Where there are only 2 parts to send (text/plain and text/html), mimemail wraps these in a multipart/alternative mime part, but also uses multipart/alternative for the content-type of the entire message. In Evolution with message viewing set to "Prefer plain text" or "Plain text only" this results in the message being shown blank with "Unknown attachment". It could also be the reason for some of the other non-display bug reports you're seeing here.
I'm not sure what's correct here in relation to RFCs but I suspect that it should be either
1. multipart/mixed message containing multipart/alternative part containing text/plain and text/html, or
2. multipart/alternative message containing text/plain and text/html.
The easy way to achieve (1) and keep Evolution happy is to add one line to mimemail.inc at about #309:
$content_type = 'multipart/mixed';
which resets the mime-type for the message as a whole (this is done anyway if other parts and / or attachments are included).
HTH
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | mimemail.patch | 347 bytes | gjvoosten |
Comments
Comment #1
jerdavisI'll try to test this out, but would appreciate any other input if anyone else has looked at this and tried this with other mail clients.
Comment #2
jerdavisI've seen what you're referring to now in my testing, and will see what I can do to fix it. Incidentally this will also (mostly) fix the plain text portion not being selectable in some mail agents.
The problem does go deeper than just what is mentioned here, but even with some fixes it's not clear whether or not all mail agents will respect the formatting, even when it conforms more closely to the RFC.
Comment #3
sgdev commentedI'm wondering if there's been any progress on this issue? We've had a couple of customers contact us who are running Eudora on Windows. They are telling us they are receiving their newsletters as a blank page. If I attempt to review one of the Simplenews newsletters in Thunderbird with HTML rendering it looks fine. If I select "plain text only" in Thunderbird, it is blank.
Comment #4
sgdev commentedI have tested this solution and it fixes the problem for email clients such as Thunderbird, but it does not work for Outlook 2007/Hotmail.
In Outlook 2007/Hotmail, the entire email is blank, both plain text and HTML. The email is blank even though I have applied the Outlook 2003/2007 patch (http://drupal.org/node/225731). Adding the $content_type line above causes a blank email just like if the Outlook 2003/07 patch had not been applied at all.
Comment #5
patcon commentedJust wanted to point out that I've also received word from a few contact that an announcement email sent with simplenews and mimemail arrived blank
Any definitive answer on who this might affect. I am sending to mostly school board emails, and since clients tend to be standardized, it might help me decide whether I should look into alternatives. I'm a little worried that not even the sender would show up, in which case they might simply erase it without knowing where it came from.
Thanks to anyone who can offer advice! :)
Comment #6
steve.m commentedWe have just had similar problems with clients using Hotmail and Entourage. I worked around this by editing mimemail.inc to add a conditional return value that doesn't wrap the content that extra, unnecessary time at all:
Comment #7
gjvoosten commentedThis one-line fix works correctly for e.g. SquirrelMail (webmail client), and also works correctly of course in clients like Evolution.
N.B. I'm using Drupal 6, but the results are the same.
Attached steve.m's one-line fix as a patch so other people don't have to look for the correct line in the code. ;-)
Comment #8
chriscohen commentedThis approach works for me also. Previously emails were coming through to the iPhone in text format, but after applying this, they're in HTML format.
Comment #9
sgabe commentedClosing issue, Drupal 5 is no longer officially supported.