Index: mimemail.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/mimemail/mimemail.module,v retrieving revision 1.20 diff -u -p -r1.20 mimemail.module --- mimemail.module 7 Dec 2007 19:03:59 -0000 1.20 +++ mimemail.module 18 Feb 2008 03:17:56 -0000 @@ -161,7 +161,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'; @@ -190,7 +190,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, $recipient, $mailkey), $subject, $plaintext, $text, $attachments); $headers = array_merge($headers, $mail['headers']); $message = array( 'address' => mimemail_address($recipient), @@ -203,9 +203,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'; @@ -283,7 +283,7 @@ if (strpos(variable_get('smtp_library', && !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); } } @@ -386,7 +386,7 @@ function mimemail_address($address) { /** * Themeable message body */ -function theme_mimemail_message($body) { +function theme_mimemail_message($body, $recipient, $mailkey) { $output = '