pmclanahan / django-celery-email

A Django email backend that uses a celery task for sending the email.
BSD 3-Clause "New" or "Revised" License
476 stars 110 forks source link

Is it possible to send html email? #68

Open dan-developer opened 4 years ago

dan-developer commented 4 years ago

It's possible?

Thanks.

endersonmenezes commented 4 years ago

Yes! You can send. You can send any email you would normally send with Django.

dan-developer commented 4 years ago

I just found it here in the documentation:

from django.core import mail

emails = (
    ('Hey Man', "I'm The Dude! So that's what you call me.", 'dude@aol.com', ['mr@lebowski.com']),
    ('Dammit Walter', "Let's go bowlin'.", 'dude@aol.com', ['wsobchak@vfw.org']),
)
results = mail.send_mass_mail(emails)

But to send emails in HTML format, I use this:

send_mail(subject=subject, message=plain_message, html_message=html_message, from_email=None, recipient_list=[responsible_email])
endersonmenezes commented 4 years ago

Keep using your normal code, Django Celery is placed as a layer before, no commands will change, all commands are django defaults.