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 20 Jun 2007 03:02:00 -0000 @@ -127,7 +127,8 @@ function mimemail_user($op, &$edit, &$us * Send a mime-encoded email * * @param $sender The email address or user object - * @param $recipient An email address or user object * @param $subject An subject line string + * @param $recipient An email address or user object + * @param $subject An subject line string * @param $body An HTML body * @param $plaintext Whether to send message as plaintext only * @param $headers Optional e-mail headers in a keyed array @@ -135,7 +136,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 +165,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), @@ -177,9 +178,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 +258,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 +286,7 @@ function mimemail_mail_alter($mailkey, & /** * Themeable message body */ -function theme_mimemail_message($body) { +function theme_mimemail_message($body, $recipient, $mailkey) { $output = '