Mime Mail

Last updated on
10 July 2019

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

This is a Mime Mail component module (for use by other modules).

  • It permits users to receive HTML email and can be used by other modules. The mail functionality accepts an HTML message body, mime-encodes it and sends it.
  • If the HTML has embedded graphics, these graphics are MIME-encoded and included as a message attachment.
  • Adopts your site's style by automatically including your theme's stylesheet files in a themeable HTML message format
  • If the recipient's preference is available and they prefer plaintext, the HTML will be converted to plain text and sent as-is. Otherwise, the email will be sent in themeable HTML with a plaintext alternative.

This module is required by the Send module and can be used by Simplenews for HTML email. E-publish uses Send which then uses Mime Mail.

Mime Mail picks up your standard CSS and applies the CSS in a way that works in all email clients which accept HTML email. Mime Mail looks for print.css to override the standard formatting, usually to remove background colours and images that create problems when printing or viewing on handheld devices. Mime Mail also looks for a mail.css file to provide special formatting separate to the print version.

There are some issues open in the alpha version of Mime Mail for Drupal 6. If you use subthemes or multiple themes, you might end up with a different theme to what you expect.

Configuring Mime Mail with SMTP

For this approach, you will need the following modules:

After installing your modules, visit the Mail System Settings page at admin/config/system/mailsystem and click on the New Class fieldset to show its options. Then select MimeMailSystem for the format method, and SmtpMailSystem for the mail method, and click on the Save Settings button at the bottom.

Select the newly-created MimeMailSystem__SmtpMailSystem class for both the site-wide default mailer and the Mime Mail module mailer.

The Mime Mail module has its own system for supporting HTML-formatted emails as well as MIME attachments; however, problems have been encountered sending file attachments via the SMTP mail system. 

Help improve this page

Page status: No known problems

You can: