Hi,

I need to create templates for mail in Drupal using MimeMail and I need to use Mailjet for tracking the send email.
But the two modules seems not working together. When one is active the other one doesn't work anymore.
I've tried to change settings in the modules configuration. I've searched in the code of the two modules. I've tried with another mail module: HTML Mail.
I have found nothing.

Have I done something wrong or their are just incompatible ?
Someone has the solution ?

Thanks

Comments

rkcreation’s picture

Category: support » bug

+1

Seems Mime Mail sets the mail content-type to "multipart/alternative", and phpMailer doesn't support this by this way...

Mailjet Plugins’s picture

Hi there ;)

There is a conflict between 'Mail System' and the Mailjet module.
'Mail System' is a part of 'mimemail' (and 'HTML Mail' btw).

Steps to resolved (untested):
1. Download & Install MailSystem UI
2. Set Forward Class Mail as "SmtpMailSystem" in "admin / config / system / MailSystem".

And... try ;)
Best,

blandon12’s picture

Issue summary: View changes

It seems there is no "SmtpMailSystem" in forward class mail from "admin / config / system / MailSystem"

Mailjet Plugins’s picture

Status: Active » Closed (fixed)
kristofferrom’s picture

Status: Closed (fixed) » Active

Reopening this as it's not fixed as far as I can see. There is no "SmtpMailSystem" in forward class mail from admin/config/system/mailsystem.
If Mailjet is selected in any of Mail Systems classes at /admin/config/system/mailsystem emails aren't formatted as HTML.

We do need Mime Mail or HTML mail to send messages as HTML through Mailjet right? I've tried with only Mailjet module enabled and emails wasn't formatted.

sebiad’s picture

+1, we have the same problem. Did you find the solution?

What is the advantage of using Mailjet for only emails in text format? :-s
Thanks

hargobind’s picture

Component: Code » Documentation
Status: Active » Fixed

I changed the issue Component from Code to Documentation for this reason:
This is not a limitation of MailJet, it's a limitation of how Drupal's mail system uses a single class for both *format()* and *mail()*. So if you choose to send mail through MailJet, then you will have to deal with the standard "plain text" formatter.

Fortunately, there is a solution to this:

First be sure to have either the HTML Mail or Mime Mail modules installed.

Choose either option below:

1 ) Install the Mail System module, visit the Mail System configuration page, and use the "New Class" section at the bottom to generate a new format/mail combo. This essentially creates a dummy class which delegates the *format()* call to one module and *send()* to another.

2 ) I created a sandbox module called MailJet Formatter Bridge which simplifies the process of generating a new class with the MailSystem module. It will detect if you have either the HTML Mail or the Mime Mail module and use its formatter, then it will use Mailjet to send the email. Assuming you know how to download sandbox modules, the module is simple and only needs to be installed to work.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

SlimGrin’s picture

I attempted option 1 above, setting format to "MimeMail" and mail to "MailjetSmtpMailSystem." When I do this, it still comes through as plain text. I noticed that making this change also unchecked the box on the MailJet config page, "Send emails through Mailjet." If I re-click it I lose the changes on the Mail System config.

Any ideas what I'm doing wrong?