I'm using Simplenews, SMTP, MimeMail and and mail system. I have checked everywhere to send as html, when I test it, the html is visible in the email rather than rendered as it should be. Not sure if this is Simplenews or one of the other modules I'm using.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rongok’s picture

Did you select 'Full HTML' and opt out 'Send plain text email only' in Mime Mail configuration page? I was having the same problem as I opted for 'Send plain text email only'.

tefnut’s picture

Hi rongok, yep all set to Full HTML and unticked Send plain text email only
I've checked through and at any opportunity to set it to send as html I have, got quite an inpatient client wanting this sorted :(

Thanks though

thesame-’s picture

Make sure you set both - Site-wide default MailSystemInterface class and HTML Mail module class to HTMLMailSystem in admin/config/system/mailsystem.

kenp’s picture

Hi Im having similar issues. In testing the newsletter I am getting the theme (Business) but the text that is full html is being lumped into one big paragraph instead of staying nice ly formatted also its lost the color and bolding. all links are ok but the image is not showing
its on godaddy virtual (whats the best hosting for drupal?)

simplenews letter
mimemail
html mail
emogrify
echo
pathologic

any ideas?

photos show how it should look and how it looks

ericwongcm’s picture

I had the same problem and I found there is a 3rd location to set html that the documentation forget to mention. Go to Home » Administration » Configuration » Web services, click "edit newsletter category" and then make sure the "EMAIL SETTINGS" is set to HTML as well.

viktor.mastoridis’s picture

Ok, I had the same problem, solved it and confirming that HTML has to be set on three locations:
1.
configuration > system > mail system
or
admin/config/system/mimemail
2.
configuration > web services > newsletters > settings
or
admin/config/services/simplenews/settings
3.
configuration > webservices > edit newsletter category (of the newsletter in question)
or
admin/config/services/simplenews/categories/**/edit
(** = the taxonomy category number that the newsletter is using)

Berdir’s picture

You only need 1. and 3. 2. is the default settings for new newsletters.

mradcliffe’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Issue summary: View changes
Status: Active » Needs review
FileSize
641 bytes
641 bytes

I have this issue when sending with SMTPMailer and found that there is a one-line fix for using SMTPMailer instead of Mime mail. When I tried using Mime mail, it did not send through gmail.

That is, smtp module expects that the content-type header is set. This is pretty simple.

I fixed it in 7.x-1.x and 7.x-2.x with the following patches.

sepp68’s picture

i forgot the email-format in

/admin/config/services/simplenews/categories/1/edit

Working now !!!

Thx.

akleinwaechter’s picture

Tanks mradcliffe! You saved my life!

pammy-pammy’s picture

Thank you mradcliffe! You saved my life too! You're HERO!

mradcliffe’s picture

Status: Needs review » Reviewed & tested by the community

I think that makes it RTBC.

Berdir’s picture

Status: Reviewed & tested by the community » Needs work

We made a very similar change in 8.x-1.x, to support swiftmailer. However, there, we used "text/html; charset=UTF-8", because it was not correctly parsed without the charset.

Can you try if that works for you as well and if so, include that? Thanks, and sorry for the long wait time.

samstamport’s picture

This problem went away and now it's come back. Maybe it's because I disabled, uninstalled, installed, and enabled Debut Newsletter?

I have checked & re-checked mimemail, smtp, mailsystem, and newsletter categories. All say HTML, but my email comes with HTML tags instead of being formatted nicely.

samstamport’s picture

I could not get mimemail to work. I used HTML mail instead.

bisonbleu’s picture

#6 is what fixed it for me. It's really not obvious for a Simplenews newcomer to realize that 'HTML' needs to be set in 3 separate UI. Thanks @viktor.mastoridis

BDuell’s picture

FYI, we had one more setting that had to be made in Configuration -> System -> MailSystem - we had to have "MimeMailSystem" selected as well.

Rob C’s picture

Hmmm, mimemail + adding some custom headers to simplenews_mail() (hook_mail) seems to work. Not sure whats going on, but html is set on all forms, smtp is set as class in mail system config and smtp is able to send html and the correct format is set everywhere (html). Wish i had more time to debug this, but this confirms the patch i guess. (i added this to hook_mail

    array(
      'MIME-Version' => '1.0',
      'Content-Type' => 'text/html; charset=UTF-8;',
      'Content-Transfer-Encoding' => 'base64',
      'X-Mailer' => 'Drupal'
    )

base64 > embedded images)

robcarr’s picture

Problem still remains. Updated patch attached for 7.x-1.1 (can also be applied to DEV release)