Index: mimemail.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mimemail/mimemail.module,v
retrieving revision 1.14.2.4
diff -u -F^f -r1.14.2.4 mimemail.module
--- mimemail.module	9 Apr 2007 17:03:00 -0000	1.14.2.4
+++ mimemail.module	25 Apr 2007 03:58:47 -0000
@@ -135,7 +135,7 @@ function mimemail_user($op, &$edit, &$us
  * 
  * @return result from mail() call
  */
-function mimemail_prepare($sender, $recipient, $subject, $body, $plaintext=null, $headers=array(), $text=null, $attachments=array()) {
+function mimemail_prepare($sender, $recipient, $subject, $body, $plaintext=null, $headers=array(), $text=null, $attachments=array(), $mailkey = '') {
 
   require_once dirname(__FILE__).'/mimemail.inc';
 
@@ -164,7 +164,7 @@ function mimemail_prepare($sender, $reci
   
   $plaintext = $plaintext || variable_get('mimemail_textonly', 0);
   $sender    = mimemail_address($sender);
-  $mail      = mimemail_html_body(theme('mimemail_message', $body), $subject, $plaintext, $text, $attachments);
+  $mail      = mimemail_html_body(theme('mimemail_message', $body, $mailkey), $subject, $plaintext, $text, $attachments);
   $headers   = array_merge($headers, $mail['headers']);
   $message   = array(
     'address' => mimemail_address($recipient),
@@ -177,9 +177,9 @@ function mimemail_prepare($sender, $reci
   return $message;
 }
 
-function mimemail($sender, $recipient, $subject, $body, $plaintext=null, $headers=array(), $text=null, $attachments=array()) {
+function mimemail($sender, $recipient, $subject, $body, $plaintext = NULL, $headers=array(), $text = NULL, $attachments = array(), $mailkey = '') {
 
-  $message = mimemail_prepare($sender, $recipient, $subject, $body, $plaintext, $headers, $text, $attachments);
+  $message = mimemail_prepare($sender, $recipient, $subject, $body, $plaintext, $headers, $text, $attachments, $mailkey);
 
   $engine = variable_get('mimemail_engine', 'mimemail') .'_mailengine';
   
@@ -257,7 +257,7 @@ function mimemail_mailengine($op, $messa
   && !function_exists('drupal_mail_wrapper')) {
 
   function drupal_mail_wrapper($mailkey, $to, $subject, $body, $from, $headers) {
-    return mimemail($from, $to, $subject, $body, null, $headers);
+    return mimemail($from, $to, $subject, $body, NULL, $headers, NULL, array(), $mailkey);
   }
 } 
 
@@ -285,7 +285,7 @@ function mimemail_mail_alter($mailkey, &
 /**
  * Themeable message body
  */
-function theme_mimemail_message($body) {
+function theme_mimemail_message($body, $mailkey) {
   $output = '<html><head><style type="text/css"><!--';
 
   // attempt to include a mail-specific version of the css.
