Open mlorant opened 8 years ago
For information (and those who might be blocked by this), it is possible to workaround this problem by using the following method:
from django.core.mail import EmailMultiAlternatives
mail = EmailMultiAlternatives(
"Subject", "Plain text message", "do-not-reply@domain.com", "recipient@domain.com"
)
mail.attach_alternative("HTML message", 'text/html')
mail.send()
Thus, mail provider seems to prefer displaying the HTML version instead of the plain one.
Using
MailjetBackend
with the following Django code:... where
message
contains some HTML tags is sending to the recipient(s) a plain text mail, where the HTML is not interpreted.Attaching two alternatives (plain & html) works though, but since the code above is documented as official part of the Django API, I think it should be handled.
EDIT: I should mention this method worked with another competitor backend before :confused: