> >>> from django.core.mail import send_mail > >>> send_mail('subject is', 'message is and is not 12342', ' fromem...@gmail.com', ['sen...@gmail.com']) > 1 > >>> > > I am receiving this email in my gmail account, incidently which is the same gmail account used for the smtp, but the from email is showing up as the sen...@gmail.com and should be fromem...@gmail.com >
The GMail servers will automatically override any provided envelope or message sender address value and replace it with the address used to authenticate to SMTP due to name space collisions and spam protection. There's no way to override this behavior. You'll need to find another mail relay service if this is critical. -James -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Be%2BciVH6D47n2VDMw%3DvaDNkNGX5xsoi-86-qV1q6g-sQx2ZPA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.