EMAIL_BACKEND where to read
from django.core.mail import EmailMultiAlternatives
email = EmailMultiAlternatives(
subject='hello from sparkpost',
body='Woo hoo! Sent from Django!',
from_email='[email protected]',
to=['[email protected]'],
cc=['[email protected]'],
bcc=['[email protected]'],
reply_to=['[email protected]']
)
email.attach_alternative('<p>Woo hoo! Sent from Django!</p>', 'text/html')
email.attach('image.png', img_data, 'image/png')
email.send()