Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Using:
Mail System - 7.x-2.33
Mime Mail - 7.x-1.0-alpha1+9-dev
Simplenews - 7.x-1.0-beta2+10-dev
Comments
Comment #1
kozmicblues CreditAttribution: kozmicblues commentedComment #2
bradhawkins CreditAttribution: bradhawkins commentedI'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.
Comment #3
llribas CreditAttribution: llribas commentedsame problem here, it seems to ignore the "Theme to render the emails" settings (and it always use the admin theme).
Comment #4
llribas CreditAttribution: llribas commentedBy the way:
I'm using simplenews + mimemail + mailsystem
Comment #5
llribas CreditAttribution: llribas commentedI 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
Comment #6
captcodemonkey CreditAttribution: captcodemonkey commentedI'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.
Comment #7
sgabe CreditAttribution: sgabe commented#1524718: Theme to render the emails ignored is marked as a duplicate of this.
Comment #8
atolborg CreditAttribution: atolborg commentedIm 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.
Comment #9
caspervoogt CreditAttribution: caspervoogt at Plethora commentedWhat got it working for me was to edit the Mailsystem config at admin/config/system/mailsystem and set both "Site-wide default MailSystemInterface class" and "Mime Mail module class" to MimeMailSystem. Previously I had "Site-wide default MailSystemInterface class" set to SMTP and "Mime Mail module class" set to MimeMailSystem.
Additionally, I enabled the Mime Mail CSS Compressor submodule, which converts CSS from my theme into inline CSS. It reads my mail.css inside my theme's css folder, and converts it to inline CSS.
Comment #10
caspervoogt CreditAttribution: caspervoogt at Plethora commented