Index: htmlmail.admin.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/htmlmail/htmlmail.admin.inc,v retrieving revision 1.2 diff -u -p -r1.2 htmlmail.admin.inc --- htmlmail.admin.inc 15 Jul 2009 05:42:59 -0000 1.2 +++ htmlmail.admin.inc 15 Dec 2009 02:41:28 -0000 @@ -26,6 +26,13 @@ function htmlmail_admin_settings() { '#default_value' => variable_get('htmlmail_preformat', '1'), '#description' => t('Automagically inserts the <HTML> <HEAD> <BODY> tags, untick if you want control over this. Leave checked when using a WYSIWYG editor.
Recommended when using template.'), ); + $form['htmlmail_rel_to_abs'] = array( + '#type' => 'checkbox', + '#title' => t('Convert relative links to absolute'), + '#default_value' => variable_get('htmlmail_rel_to_abs', '0'), + '#description' => t('Automagically converts relative image links and URLs to absolute, untick if you want control over this.
rel_to_abs needs to be installed and enabled.'); + '#enabled' => (module_exists('rel_to_abs')) ? TRUE : FALSE, + ); return system_settings_form($form); } Index: htmlmail.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/htmlmail/htmlmail.module,v retrieving revision 1.15 diff -u -p -r1.15 htmlmail.module --- htmlmail.module 15 Jul 2009 05:42:59 -0000 1.15 +++ htmlmail.module 15 Dec 2009 02:41:28 -0000 @@ -82,6 +82,10 @@ function htmlmail_mail_alter(&$message) $message['body'] = _filter_url($message['body'], 0); } + if (module_exists('rel_to_abs') && variable_get('htmlmail_rel_to_abs', '1') == 1) { + $message['body'] = rel_to_abs_filter('prepare', 0, -1, $message['body']); + } + if (variable_get('htmlmail_emogrifier', '0') == 1) { $message['body'] = _htmlmail_emogrify($message); }