Index: theme/mimemail.theme.inc
===================================================================
RCS file: /cvs/drupal/contributions/modules/mimemail/theme/mimemail.theme.inc,v
retrieving revision 1.2
diff -u -r1.2 mimemail.theme.inc
--- theme/mimemail.theme.inc	10 Aug 2009 17:53:39 -0000	1.2
+++ theme/mimemail.theme.inc	25 Mar 2010 19:47:27 -0000
@@ -5,7 +5,7 @@
 
   return array(
     'mimemail_message' => array(
-      'arguments' => array('body' => NULL, 'mailkey' => NULL),
+      'arguments' => array('subject' => NULL, 'body' => NULL, 'mailkey' => NULL),
       'template' => 'mimemail',
       'pattern' => 'mimemail__',
       'file' => 'mimemail.theme.inc',
@@ -18,6 +18,7 @@
  * A preprocess function for theme('mimemail_message').
  *
  * The $variables array initially contains the following arguments:
+ * - $subject:  The message subject
  * - $body:  The message body
  * - $mailkey:  The mailkey associated with the message
  *
Index: mimemail.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/mimemail/mimemail.module,v
retrieving revision 1.46
diff -u -r1.46 mimemail.module
--- mimemail.module	20 May 2009 23:37:26 -0000	1.46
+++ mimemail.module	25 Mar 2010 19:47:27 -0000
@@ -124,8 +124,8 @@
       }
     }
   }
-  $subject = mime_header_encode(trim(drupal_html_to_text($subject)));
-  $body = theme('mimemail_message', $body, $mailkey);
+  $subject = trim(drupal_html_to_text($subject));
+  $body = theme('mimemail_message', $subject, $body, $mailkey);
   foreach (module_implements('mail_post_process') as $module) {
     $function = $module .'_mail_post_process';
     $function($body, $mailkey);
@@ -133,6 +133,7 @@
 
   $plaintext = $plaintext || variable_get('mimemail_textonly', 0);
   $sender    = mimemail_address($sender);
+  $subject   = mime_header_encode($subject);
   $mail      = mimemail_html_body($body, $subject, $plaintext, $text, $attachments);
   $headers   = array_merge($headers, $mail['headers']);
   $message   = array(
