While theming the message body, MimeMail finds the 'current css' to add thanks to the function drupal_get_css().

This 'current css' is the css of the theme used to edit the node.
When an administration theme is used to edit nodes, the css of this theme will be added to the mail; causing the mail to be wrongly themed.

Comments

theorichel’s picture

I may have this same issue. I am on Drupal 5.11 and was used to sending out Simplenews Newsletters themed with Simplenews_Template. Since the last upodate of Mimemail however some theme is superimposed over that template. My site as well as my newsletter were centered, but my admin theme (Garland) is left aligned. Now my newsletter is left aligned.

franzinenstein’s picture

Same problem.
Did you find any solution?

MedicSean37’s picture

Yeah, I have this issue too.

Z2222’s picture

When you look at the HTML source of th emails do you see and HTML document embedded within another HTML document? (i.e., two <html> elements)

TheresaB-1’s picture

Priority: Normal » Critical

I am having this same issue as well has there not been a fix for this or at least an identification of the problem. This issues makes both Mime Mail and Simplenews unusable.

TheresaB-1’s picture

Ok I found this helped me and sloved my problems.

go to admin/settings/htmlmail/settings and uncheck "Line break converter", "Preformat HTML code" and "URL Filter"

I am using FCKeditor and when I unchecked those adn saved everything worked.

The code picks up my mail.css and now sends the code with only that css and not the entire sites css.

I hope this helps.

jerdavis’s picture

Status: Active » Postponed (maintainer needs more info)

One solution for this is hinted at in TheresaB's post. If you setup a mail.css file within your theme directory this file will be used rather than the drupal_get_css() call.

With the architecture we have planned for 2.x we'll have a few other options which will give you greater flexibility as well.

For the people having this problem - are you all using Simplenews?

Jer

geerlingguy’s picture

I'll try the mail.css approach; I've been having trouble with MIME mail messages, too.

BarisW’s picture

Yes, I am using simplenews.

Cannot get it to work. mail.css isn't used, whatever I try.
But also the simplenews-newsletter-body.tpl.php isn't being used.

Drives me crazy for days now...

TheresaB-1’s picture

One solution for this is hinted at in TheresaB's post. If you setup a mail.css file within your theme directory this file will be used rather than the drupal_get_css() call.

With the architecture we have planned for 2.x we'll have a few other options which will give you greater flexibility as well.

For the people having this problem - are you all using Simplenews?

Jer

Yes I am using simplenews and 'just using a mail.css' did not work for me the problem I was having completely and absolutely fixed once I went to admin/settings/htmlmail/settings and unchecked "Line break converter", "Preformat HTML code" and "URL Filter"

Once I did that it used the mail.css and stopped bringing in all the other style sheets. I suggest you try the un-checking those values and then go through once more following the instructions for both simplenews and MimeMail, I did and now it is all playing nice together.

jerdavis’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

The fix for mail.css not being included had been addressed in http://drupal.org/node/319353

I'm going to tentatively mark this one as fixed - if people still have problems with admin themes being included or overriding mail.css please let me know.

Jer Davis