Is 7.x support mime-email or html mail module ?

Created on 15 April 2012, about 13 years ago
Updated 30 May 2025, 8 days ago

As title, does it support one of these modules?
My purpose is to send the MIME format email by postmark.

B.R
Devin

πŸ’¬ Support request
Status

Active

Version

1.1

Component

Miscellaneous

Created by

πŸ‡¨πŸ‡³China xuxizh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States jphelan

    This seems to work for me to conditionally set it for emails containing HTML.

    /**
     * Implement hook_mail_alter().
     */
    function my_module_mail_alter(&$message) {
      //test if message body contains html tags
      if (preg_match('/<[^>]*>/', $message['params']['message'])) {
        // Set the content type to HTML
        $message['headers']['Content-Type'] = 'text/html';
      }
    }
    
Production build 0.71.5 2024