I have a view embedded into an email with a custom theme for the view. Since the theme that sends the email is the admin theme, mime mail looks for the view theme override in that admin theme, instead of the theme specified under "Theme to render the emails" in the mail system settings page. It finds mimemail-message.tpl.php in the correct theme folder, not the admin which sends the email.

Mail System - 7.x-2.33
Mime Mail - 7.x-1.0-alpha1+9-dev
Simplenews - 7.x-1.0-beta2+10-dev


kozmicblues’s picture

Component: Module compatibility » Code
bradhawkins’s picture

I'm seeing the same problem. I have set my theme in the "Theme to render the emails" setting at admin/config/system/mailsystem but that setting is ignored at times.

To test, I put a copy of mimemail-message.tpl.php into my theme, added a simple line of text "this template is in the THEME" and added the following line "this template comes from the module" to the original template in the module's folder.

If I do something in the admin panel, like send a test email, block and unblock a user, the email gets themed from the template in the module directory. However, if do something like complete a commerce checkout I get emailed an invoice from the template in the theme directory.

llribas’s picture

same problem here, it seems to ignore the "Theme to render the emails" settings (and it always use the admin theme).

llribas’s picture

By the way:
I'm using simplenews + mimemail + mailsystem

llribas’s picture

I tested more in depth:

- It always use the styles from the administration theme, no matter what theme you select in "Theme to render the emails" setting. (Note that the administration theme is the one that applies to the admin form page from where you send the newsletter. So probably its using always the active theme at the moment of sending the mail.)

- My website theme is a zen sub-theme. When I use this zen sub-theme as administration theme (trying to send a simplenews newsletter rendered with my theme), it doesn't not apply any style (html markup but without any style definition). I think there's a problem with Zen also.
If I select as "administration theme" seven or bartik then the mail have correct css inline styles.

I need to do some basic theming to the newsletter mails!
Please any help or provisional solution will be appreciated

captcodemonkey’s picture

I'm seeing the same issue currently with mimemail + mailsystem (also using SMTP), I have mimemail set to render and smtp set for send with a custom class, though i don't think that matters here.

Removing the admin theme from the user causes the email to render normally, but if the admin theme is enabled for the user the email comes across in some kind of base encoding.

sgabe’s picture

Issue summary: View changes

#1524718: Theme to render the emails ignored is marked as a duplicate of this.

atolborg’s picture

Im seeing the same problem using mailsystem and mimemail. The mail is being sent using a VBO action, which resends an order confirmation to the customer.