I recently revamped a client site and, since then, his newsletter has a thick black border around the whole thing. There's nothing in the ST settings setting it to black. I also went into phptemplate_simplenews_newsletter() and put in a dsm($node) right before it returns it and there's nothing in there setting a border / background to black, either.

I'm really at a loss as to where to look from here. The site theme changed and now has black sidebars. Could that somehow be leaking through into the newsletter? I don't see how the CSS of a site could possibly affect the emails it sends out but I'm grasping at straws.

Any ideas?

Thanks,

Michelle

Comments

Z2222’s picture

If you check the HTML source of the message do you see two opening <body> tags? I'm seeing that in my emails.

michelle’s picture

If I view the source, it's all encoded so I have no idea. At the point where I added the dsm, it looked fine.

Michelle

Z2222’s picture

Are you on Linux? If you copy the encoded text into a text file and then run this command on it, it will decode it:

$ base64 -d your-encoded-text.txt

There' also an online decoder here:
http://www.opinionatedgeek.com/dotnet/tools/Base64Decode/

michelle’s picture

Whoah... Got some interesting results from that. Most of the HTML looks fine, once I ran it through Tidy. But up at the top is a section an HTML comment that starts with "Plain HTML Version" which looks like it contains the CSS from the theme. I don't know anything about how emails interpret HTML but it seems to be using that somehow. Do you have any idea how that got in there and how I can get it out? The emails should not have any CSS from the site in them. They are just plain white other than colored links, which I specified in the template's style section.

Thanks,

Michelle

Z2222’s picture

If you don't run it through tidy does it look ok? I'm wondering because I see an HTML document embedded in an HTML document in my emails and I'm wondering if Tidy is stripping that out.

See also:
http://drupal.org/node/321871

I tried this quick solution, but it centered everything and I haven't figured out how to un-center it yet:
http://drupal.org/node/121849#comment-915852

(not able to decode the email yet)

michelle’s picture

Status: Active » Closed (duplicate)

It's there from the start. Tidy isn't putting it in. I'm saying the HTML after that looks just fine.

Looking at #321871: MimeMail adds the CSS of the theme that's used while editing the node and that's likely it. Marking this one as a duplicate and I'll follow up there, thanks. I searched in the Simplenews Template queue but didn't realize it was a Mime Mail problem.

Thanks for the pointer,

Michelle

michelle’s picture

@guitarmiami - Thanks a ton! Shredding that mime mail theme function did the trick. I never would have thought to look there if it wasn't for you. I had no idea mime mail did anything except encode it as HTML. Doh!

Michelle