Index: simplenews.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simplenews/simplenews.module,v retrieving revision 1.76.2.136 diff -u -p -r1.76.2.136 simplenews.module --- simplenews.module 9 Sep 2009 13:32:06 -0000 1.76.2.136 +++ simplenews.module 20 Oct 2009 18:46:09 -0000 @@ -1513,6 +1513,17 @@ function simplenews_mail($key, &$message // Check if this node-language pair has been buffered. // If not, build the message and store it for later use. if (!isset($messages[$nid][$langcode])) { + + // Use the default theme to render the email content. + // We temporary clear the $custom_theme to prevent the admin theme + // from being used when the newsletter is sent from the + // node add/edit form and the admin theme is other than the + // default theme. When no $custom_theme is set, the + // After theming the email $custom_theme is restored. + global $custom_theme; + $org_cutom_theme = $custom_theme; + $custom_theme = ''; + $node = drupal_clone($context['node']); // Add simplenews specific header data @@ -1559,6 +1570,8 @@ function simplenews_mail($key, &$message $footer = theme(array('simplenews_newsletter_footer__'. $context['node']->simplenews['tid'], 'simplenews_newsletter_footer'), $context['node'], $key, $message['language']); $messages[$nid][$langcode]['footer'] = $footer; + // Restore the custom theme. + $custom_theme = $org_cutom_theme; } else { // Get message data from buffer