I installed Mime Mail to be able to sent HTML email, and of course, the Mail Format field now shows the additional formats (Filtered HTML and Full HTML). What I have found is that choosing one of those formats does not set the way that mail is sent. If the default in Mime Mail conguration is Plain text, and I choose one of the HTML formats, the Plain text engine is used, and so the email is sent as plain text, with the email body text being the HTML code(instead of being sent as a text/html) . I haven't dug into Mime Mail enough to find how to do it, but if possible, Mime Mail should be told to use the appropriate MIME format (text/plain or text/html) for this particular message.

Comments

hansfn’s picture

Title: Changing Mail Format does not change MimeMail format used » Views Send - Changing Mail Format does not change MimeMail format used
Project: Views Send Drupal 7 Port » Mime Mail
Version: » 7.x-1.0-alpha1

Yes, I have noticed this problem to. I digged a little bit in Mime Mail, but didn't find a way to force it to use a specific format. I'll send this bug report over to the Mime Mail issue queue and see if they have an easy solution.

Currently, on my test installation, I'm "solving" it by not using plain text as default in Mime Mail.

sgabe’s picture

Version: 7.x-1.0-alpha1 » 7.x-1.x-dev
Category: bug » feature
Status: Active » Closed (duplicate)

I am marking this as a duplicate of #1285538: A mechanism for specifying a text format.

Sarenc’s picture

It looks like this feature has been added but it isn't working for me.

In mimemail.mail.inc we have the following:

if (preg_match('/plain/', $message['headers']['Content-Type'])) {
  $message['body'] = check_markup($message['body'], variable_get('mimemail_format', filter_fallback_format()));
}

but shouldn't it be if (!preg_match( ? It seems to be only applying the text format if the mail is set to plain text. When I added the ! it worked for me.

Sarenc’s picture

My issue was due to webform:

    if ($email['html']) {
      // MIME Mail requires this header or it will filter all text.
      $mail_params['headers']['Content-Type'] = 'text/html; charset=UTF-8';
    }

which seems strange as I want mimemail to filter the text. I'll take this up with quicksketch :)