Only in 6.x-0.9-patched/mimemail/CVS: Entries.Log diff -urp cvs/mimemail/mimemail.inc 6.x-0.9-patched/mimemail/mimemail.inc --- cvs/mimemail/mimemail.inc 2008-08-08 00:24:18.000000000 -0400 +++ 6.x-0.9-patched/mimemail/mimemail.inc 2008-09-02 05:11:37.000000000 -0400 @@ -503,7 +503,7 @@ function _mimemail_url($url) { return '#'. $fragment; } - return url($path, $query, $fragment, TRUE); + return url($path, array('query' => $query, 'fragment' => $fragment, 'absolute' => TRUE)); } /** diff -urp cvs/mimemail/mimemail.info 6.x-0.9-patched/mimemail/mimemail.info --- cvs/mimemail/mimemail.info 2007-01-05 00:44:09.000000000 -0500 +++ 6.x-0.9-patched/mimemail/mimemail.info 2008-09-02 05:11:37.000000000 -0400 @@ -2,3 +2,4 @@ name = Mime Mail description = E-mail with HTML and attachments package = Mail +core = 6.x \ No newline at end of file diff -urp cvs/mimemail/mimemail.module 6.x-0.9-patched/mimemail/mimemail.module --- cvs/mimemail/mimemail.module 2008-08-10 21:37:49.000000000 -0400 +++ 6.x-0.9-patched/mimemail/mimemail.module 2008-09-12 17:37:48.000000000 -0400 @@ -9,19 +9,17 @@ * Implementation of hook_menu() */ function mimemail_menu() { - $items[] = array( - 'path' => 'admin/settings/mimemail', - 'title' => t('Mail'), - 'description' => t('HTML E-mail settings'), - 'callback' => 'drupal_get_form', - 'callback arguments' => 'mimemail_settings', - 'access' => user_access('administer site configuration'), + $items['admin/settings/mimemail'] = array( + 'title' => 'Mime Mail', + 'description' => 'HTML E-mail settings', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('mimemail_settings'), + 'access arguments' => array('administer site configuration'), 'type' => MENU_NORMAL_ITEM, ); - $items[] = array( - 'path' => 'mimemail', - 'callback' => 'mimemail_post', - 'access' => variable_get('mimemail_incoming', FALSE), + $items['mimemail'] = array( + 'page callback' => 'mimemail_post', + 'access callback' => variable_get('mimemail_incoming', FALSE), 'type' => MENU_CALLBACK, ); return $items; @@ -248,15 +246,6 @@ function mimemail($sender, $recipient, $ return FALSE; } - // Allow modules implementing hook_mail_alter() to function when all - // mail is routed through mimemail. - // - doesn't support passing all the variables used here (e.g. attachements) - // - should also provide a hook_mimemail_alter for full mimemail support - foreach (module_implements('mail_alter') as $module) { - $function = $module .'_mail_alter'; - $function($mailkey, $recipient, $subject, $body, $sender, $headers); - } - $engine_prepare = variable_get('mimemail_engine', 'mimemail') .'_prepare'; if (function_exists($engine_prepare)) { $message = $engine_prepare($sender, $recipient, $subject, $body, $plaintext, $headers, $text, $attachments, $mailkey); @@ -360,11 +349,18 @@ function mimemail_mailengine($op, $messa if (strpos(variable_get('smtp_library', ''), 'mimemail') && !function_exists('drupal_mail_wrapper')) { - function drupal_mail_wrapper($mailkey, $to, $subject, $body, $from, $headers) { + function drupal_mail_wrapper(&$message) { + $from = $message['from']; + $to = $message['to']; + $subject = $message['subject']; if ($format = variable_get('mimemail_format', FILTER_FORMAT_DEFAULT)) { - $body = check_markup($body, $format); + $body = check_markup($message['body'], $format); } - + else { + $body = $message['body']; + } + $headers = isset($message['headers']) ? $message['headers'] : array(); + $mailkey = isset($message['mailkey']) ? $message['mailkey'] : ''; return mimemail($from, $to, $subject, $body, NULL, $headers, NULL, array(), $mailkey); } } @@ -462,6 +458,17 @@ function mimemail_address($address) { } /** + * Implementation of hook_theme(). + */ +function mimemail_theme() { + return array( + 'mimemail_message' => array( + 'arguments' => array('body' => NULL, 'mailkey' => NULL) + ) + ); +} + +/** * Themes the message body. * * @param $body @@ -482,7 +489,7 @@ function theme_mimemail_message($body, $ $output .= '