Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I recieve messages without HTML tags. Only text values.
Comment | File | Size | Author |
---|---|---|---|
#6 | 2777695-mail-plugin.patch | 1.66 KB | geerlingguy |
Comments
Comment #2
geerlingguy CreditAttribution: geerlingguy at Midwestern Mac, LLC commentedConfirmed. I'm upgrading my own site today, and found that the default PhpMail class in Drupal 8 strips all markup from every message, with no ability to override.
So the quick solution would be to find another mail plugin (like swiftmailer, or mimemail) and set that in your settings.php:
I'm going to see if that works. Otherwise you may need to install the mailsystem module to switch. I'm considering adding an interface / plugin to basically do the same thing as core's PhpMail, but removing the part that strips markup from the body.
Comment #3
geerlingguy CreditAttribution: geerlingguy at Midwestern Mac, LLC commentedI've also opened an issue in my site's issue tracker to see if I can come up with a temporary solution: Emails are not sent with HTML formatting.
Comment #4
geerlingguy CreditAttribution: geerlingguy at Midwestern Mac, LLC commentedI just noticed I implement a mail handler:
SimpleMailMailer
. It looks like the file is named incorrectly so it can't be identified / used currently.But if it could be and if I could get it to work with HTML emails, you could override in settings.php:
Comment #5
geerlingguy CreditAttribution: geerlingguy at Midwestern Mac, LLC commentedIf I try the above I get:
Comment #6
geerlingguy CreditAttribution: geerlingguy at Midwestern Mac, LLC commentedAttached patch fixes the HTML email problem.
To use the SimpleMail plugin, you have to add the following to your
settings.php
:Comment #7
geerlingguy CreditAttribution: geerlingguy at Midwestern Mac, LLC commentedAlso opened up follow-up issue: #3159949: No plain-text alternative is delivered when using simple_mail_send().
Comment #9
geerlingguy CreditAttribution: geerlingguy at Midwestern Mac, LLC commented