This patch fixes two problems:
- HTML mails not beeing displayed as HTML mails in Oulook 2003/2007 (it's picky about Content-Disposition and Content-Transfer-Encoding).
- Able to specify a filename for an attached file (should be fully backwards compatible).

Comments

allie micka’s picture

Thanks for your patch!

We need to review these changes discretely. Please try to remember to submit one patch for each change, and follow up on appropriate tickets - rather than creating duplicate tickets with multiple changes.

shuhaidianzi’s picture

Status: Active » Needs review
StatusFileSize
new4.82 KB

Patch updated to version 5.x-1.0.

jerdavis’s picture

Assigned: Unassigned » jerdavis

Has anyone else tested this patch? Has anyone verified that it does not cause issues with other mail clients? I'll do some testing on this, but would appreciate input if anyone else has tried it.

allie micka’s picture

Status: Needs review » Needs work

The patch doesn't conform to coding standards ( specfically, variable names and extra comments ). We can't eschew UTF-8 mime parts or base64 encoding without introducing problems elsewhere.

If we can get this functionality in a non-invasive way, I'm for it!

jerdavis’s picture

Category: feature » support
Status: Needs work » Closed (fixed)

HTML emails seem to look fine in Outlook 2007 and 2000 based on my testing. In addition, we've added some filename support for the API.

If you are still having issues with HTML email in outlook, please checkout the latest copy of mimemail from HEAD and attempt sending an HTML email with Send. If that fails, then please let me know exactly what version of outlook you're using and attach a copy of the message source as well as a screenshot of how the email is rendered in Outlook.

We do want to make sure things work as well as possible - so please let us know if things are still failing. For now, I'm marking this closed.

milorambaldi’s picture

StatusFileSize
new4.47 KB

I tested the newest module, but i still get the plain text email in outlook 2003. In Gmail, the email is displayed as HTML, but displayed as plain text in Outlook 03. I have attached the generated plain text email in outlook.

nickdjones’s picture

Just added this patch.

And now HTML comes into hotmail, and exchange server / outlook 2007.

note, testing shows that the issue is with the exchange server, not with the client, as both the outlook web and outlook rich clients on exchange server 2007 exhibit this behaviour.

Some other issues have cropped up though, which we're still looking into.

nickdjones’s picture

ok, other issues were our own fault.. set to filtered html somehow. This patch looks good.

aschiwi’s picture

The first patch in the original post of this thread works for me.

Btw I also needed this because we our Outlook Exchange accounts had been moved to Exchange 2007 and from that point on all Drupal newsletters (we use simplenews with mimemail) were received as plain text only, with an html attachment included.

So thanks for the patch!

gianluca.b’s picture

Version: 5.x-1.x-dev » 5.x-1.0

I'm not able to apply this patch, it is my output:

c:\Programmi\GnuWin32\bin\patch.exe -p0 < mimemail_5.x-1.0_outlook.patch --verbose --binary
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- mimemail.inc       2008-04-24 18:39:42.000000000 +0800
|+++ outlook_mimemail.inc.patch 2008-04-24 18:48:07.000000000 +0800
--------------------------
Patching file mimemail.inc using Plan A...
Hunk #1 FAILED at 121.
Hunk #2 FAILED at 141.
Hunk #3 FAILED at 221.
Hunk #4 FAILED at 235.
Hunk #5 FAILED at 264.
Hunk #6 FAILED at 290.
Hunk #7 FAILED at 303.
Hunk #8 FAILED at 313.
Hunk #9 FAILED at 324.
9 out of 9 hunks FAILED -- saving rejects to file mimemail.inc.rej
done


Anyone can help?
Or, simply, upload the patched version of mimemail.inc?

Thanks in advance.

gianluca.b’s picture

Problem solved. I had to download the original module, then applying the patch.

virtualdrupal’s picture

Version: 5.x-1.0 » 5.x-1.x-dev
Status: Closed (fixed) » Active

For Drupal 6.. I was having the same problem with Hotmail, it was converting the mail to plain text, including the style sheet at the top...

I manually applied the changes from the patch in comment #2, now HTML comes through in hotmail, which is really exciting, but all of my img tags are coming through as

<img width="191" height="158" src="http://Array"/>

This new problem effects all mail clients, including gmail, which was previously working fine...

Any ideas?

saslib’s picture

Similar problems. Installed 6.x-1.x-dev version of Mime Mail. If I set to plain text only, the message arrives properly displayed in Outlook exchange 2007. If I set to html, an html version arrives in Outlook as an attachment and a plain text version arrives in the message body but filled with code. If I copy/paste the same content into my phplist on same host and send, Outlook displays the html properly in the message body. Being a newbie, I don't know whether or how to apply the above-mentioned patch(es).

Thanks,
Saslib

saslib’s picture

StatusFileSize
new51.34 KB

Attached is the entire code for the Outlook message of which the greater portion gets displayed in the body, starting with "in default templates, but we don't want the 'form' styling" down to the message itself ending with "we'll get back to you as soon as possible."

allartk’s picture

Hi,

About the html not being displayed: see also http://drupal.org/node/310305 We (sending a newsletter to 4000 addresses) do not have problems after applying this patch.

More information about applying patches can be found here: http://drupal.org/node/60108

I remember that the html tags in the plain text part was a bug in simplenews, do you use that one? Do you have the most recent version of this module on your site installed?

Good luck!

virtualdrupal’s picture

Also check out my comment #5 in this issue, this fixed all html/css issues for me across all web mail clients and outlook...

http://drupal.org/node/334004

saslib’s picture

MikenotMike, omg it seems to be working! I'm much obliged that you posted the full patched file. Saslib

virtualdrupal’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev

You're welcome, hopefully someone gets this rolled into the actual mimemail release.. The coder that solved it (kungfu711) noted that you may no longer be able to send file attachment with this patch in place, but this isn't confirmed one way or the other... Regardless, this patch is a must in my opinion for anyone sending out newsletters with html/css content...

virtualdrupal’s picture

Version: 6.x-1.x-dev » 5.x-1.x-dev

Sorry this thread was for D5 and I accidentally bumped it to D6, the patch suggested in post #16 is only tested for D6

jboeger’s picture

Hi, I'm trying to follow this thread. For 5.x mimemail.... do I make patch to official release or the latest dev version? Thanks in advance.

aschiwi’s picture

jboeger: patch to 5.x-1.x-dev, otherwise you'd get some errors thrown at you while trying to patch.

delykj’s picture

The patch not works for me. I tried on the official release and on the dev release.
Anyone could post the zipped, working D5 version?

Thanks in advance.

jerdavis’s picture

Status: Active » Closed (duplicate)

See my update in http://drupal.org/node/310305

We're working on correcting issues such as this, but we could use some community input for people who have applied the 8bit encoding patch mentioned in #15. I'm still hesitant to make this change in the current release stream of Mimemail as there isn't a very good way to override it if a user is still dealing with an SMTP server which doesn't understand 8bit MIME.

If anyone has tested this patch, please respond back to http://drupal.org/node/310305 with information on what SMTP software Drupal is routing messages through, and what the receiving server was running.

Jer

marcus_clements’s picture

I'm working with Simplenews in Drupal 5 trying to get HTML mail in Hotmail - I haven't tested Outlook.
None of the info in http://drupal.org/node/310305 or http://drupal.org/node/372710 helped me.
The patch in this thread (http://drupal.org/files/issues/mimemail-outlook+filename.patch) didn't apply against Mimemail 5.x-1.0 so I applied by hand against that version and I do get HTML mail in Hotmail and Gmail (which are our targets) :D

I wondered if this part was particularly relevant:

- return mimemail_multipart_body($parts,"$content_type; charset=utf-8");
+ // agidise-mod: mixed
+ $content_type = 'multipart/mixed';
+
+ // agidise-mod: removed "$content_type; charset=utf-8"
+ return mimemail_multipart_body($parts,$content_type);

virtualdrupal’s picture

The updated mimemail.inc file I posted here http://drupal.org/node/334004#comment-1163542 solved my hotmail problems too.. not sure how it effects D5

s2_krish’s picture

I applied second patch (mimemail_5.x-1.0_outlook.patch), But mimemail produce lot of warning and send blank mail. Error is give below:

warning: Missing argument 2 for mimemail_mail_alter() in ..../modules/mimemail/mimemail.module on line 296.
warning: Missing argument 3 for mimemail_mail_alter() in ..../modules/mimemail/mimemail.module on line 296.
warning: Missing argument 4 for mimemail_mail_alter() in ..../modules/mimemail/mimemail.module on line 296.
warning: Missing argument 5 for mimemail_mail_alter() in ..../modules/mimemail/mimemail.module on line 296.
warning: Missing argument 6 for mimemail_mail_alter() in ..../modules/mimemail/mimemail.module on line 296.
warning: include(...../modules/mimemail/theme/mimemail.tpl.php) [function.include]: failed to open stream: No such file or directory in /var/aegir/acquia-drupal/includes/theme.inc on line 1011.
warning: include() [function.include]: Failed opening '...../modules/mimemail/theme/mimemail.tpl.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/aegir/acquia-drupal/includes/theme.inc on line 1011.

dwchris’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Status: Closed (duplicate) » Active

I am using Drupal 6 will this patch work and how do I apply and where?

sgabe’s picture

Version: 6.x-1.x-dev » 5.x-1.x-dev
Status: Active » Closed (duplicate)

No, this patch has been made for 5.x, furthermore it is a duplicate. However the 6.x branch of Mime Mail supports Outlook 2007.