This may be related to this issue:

#338460: Doens't look for mail.css in Zen subthemes: suggesting better integration with Zen theme

In template_preprocess_mimemail_message() you get the default theme as the theme to search for mail.css which is wrong since I may be running with another theme at the time the mail is being sent. It is annoying since someone who runs with an admin theme should not send emails with the admin theme... so we've got several problems and maybe the default theme is what 99% of the people want to use anyway...

There is my proposed change:

function template_preprocess_mimemail_message(&$variables) {
  global $theme;

  if ($theme) {
    $theme_name = $theme;
  }
  else {
    $theme_name = variable_get('theme_default', 'garland');
  }

  [...]

Notice that at least I put a default of 'garland' in the variable_get() call.

However, I try to use the global $theme variable instead of the default theme which much better match what I want to get in my case as I use themekey and have several different themes in use and the email should correspond to this or that theme.

Let me know what you think.

Thank you.
Alexis Wilke

P.S. I checked your -dev and noticed that the date was Jul 11, 2010... You may want to report the problem here: http://drupal.org/node/870934 although you hide the -dev so you may not care as much 8-)

Comments

sgabe’s picture

Priority: Minor » Normal
Status: Active » Closed (duplicate)

I think this has been fixed by #1349728: Possibility to configure the theme that will render the email. I am marking this as a duplicate of that.