Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I use Mail System
+ Mime Mail
+ SMTP Authentication Support
+ Mandrill
(SMTP) successfully since lot of time now.
I've upgraded Mime Mail
from version 7.x-1.0-beta3
to 7.x-1.0-beta4
and since that, all my previously working HTML email are now received as undecoded base64 encoded string in emails clients.
I've searched and tried a lot of things, and it seems to be because of bad Content-Transfer-Encoding
before base64 encoded part of email.
Here is a snippet of a dump of email in mimemail module function
This is a multi-part message in MIME format.
--ad0177a045eb126a3e144e6fba5179a0198fb3761
Content-Type: multipart/alternative; boundary="2748746a42d9e843db737836c6d60f7e2e46f1670"
Content-Transfer-Encoding: 8bit
--2748746a42d9e843db737836c6d60f7e2e46f1670
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
======== text mail ===
--2748746a42d9e843db737836c6d60f7e2e46f1670
Content-Type: text/html; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: base64
PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv(...)
--2748746a42d9e843db737836c6d60f7e2e46f1670--
--ad0177a045eb126a3e144e6fba5179a0198fb3761--
What's going wrong ?
Thanks
Comments
Comment #2
nwehner CreditAttribution: nwehner commentedI use Mandrill as well, but with PHP Mailer - it works fine that way for me.
Comment #3
rroblik CreditAttribution: rroblik commented@nwehner Thanks but
SMTP Authentication Support
do the delivery job well (PHPMailer
(Drupal module) is about the same asSMTP Authentication Support
, I've just tried that)The problem is in
Mime Mail
, that's why I opened a issue here :)Regards
Comment #4
wundo CreditAttribution: wundo at Chuva Inc. for Chuva Inc. commentedI use SMTP module + Mandrill and works great as well.
Comment #5
deepbluesolutions CreditAttribution: deepbluesolutions commentedWere seeing this issue as well, when using SimpleNews dev , Smtp dev and MimeMail beta4, reverting to MimeMail Beta 3 restored the correct encoding on the output. The issue is also shown when using mandrill instead of smtp.
Comment #6
janton CreditAttribution: janton commentedWe've issues as well and will revert back to beta3.
We get errors from mandrill that all body mails are empty ?
Also we see some strange attachment.dat file with no SMTP mails.
We've exactly the same setup:
Mail System + Mime Mail + SMTP Authentication Support + Mandrill
Comment #7
weseze CreditAttribution: weseze commentedYou can work arround this issue by implementing your own mimemail engine in a custom module:
After enabling this module, visit /admin/config/system/mimemail and there should be an extra setting at the bottom now called "E-mail engine". Select "Mandrill compatible engine" and hit "Save configuration". That's it.
It's far from an ideal (or correct) solution so feel free to give feedback.
Comment #8
blart CreditAttribution: blart commentedThe problem was in #2404719. Reverting the patch has fixed this issue for us with Mail System + Mime Mail + SMTP Authentication Support + Mandrill setup.
Comment #9
TR CreditAttribution: TR commentedYes, Mandrill tries to do some of the same mail formatting that is done by Mime Mail. See #2955538: Multi-part message in Mimemall for an explanation. There are issues in the Mandrill queue which address this, start with #1863988: Mail System HTML Email issue with: MimeMailSystem_MandrillMailSystem.
Mime Mail formats the message, it does nothing about sending. Mandrill mixes formatting and sending. I think there's always going to be some clash between Mime Mail and Mandrill until Mandrill separates its formatting from its sending - otherwise Mandrill can't be used with any other mail system module.