You are here

function mimemail_compress_mail_post_process in Mime Mail 6

Same name and namespace in other branches
  1. 7 modules/mimemail_compress/mimemail_compress.module \mimemail_compress_mail_post_process()

Implements hook_mail_post_process().

File

modules/mimemail_compress/mimemail_compress.module, line 11
Component module for sending MIME-encoded emails.

Code

function mimemail_compress_mail_post_process(&$message, $mailkey) {
  module_load_include('inc', 'mimemail_compress');

  // Separate CSS from HTML for processing.
  $parts = mimemail_compress_clean_message($message);

  // Compress HTML and CSS into combined message.
  $output = new mimemail_compress($parts['html'], $parts['css']);
  $output = $output
    ->compress();
  $message = $output;
}