I'm trying to send a mail using Django with EmailMultiAlternatives. It works well but in "from" says "info"
Is it posible to say my name for example? How can I do this?
Here is my code:
subject, from_email, to = 'Afiliations', '[email protected]', '[email protected]'
text_content = 'Afiliation is working.'
t = loader.get_template('emails/afiliados.html')
c = Context({ 'order': order_obj })
html_content = t.render(c)
msg = EmailMultiAlternatives(subject, text_content, from_email, [to])
msg.attach_alternative(html_content, "text/html")
msg.send()
For the Name to be displayed instead of the username part of the email, just do
from_email = "[email protected] <[email protected]>"
OR
from_email = "Name <[email protected]>"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With