views:

192

answers:

1

I need some help regarding django emailing. I have set the settings.EMAIL_HOST_USER to '[email protected]' and whenever I am trying to send an email in any context, its taking the 'do-not- [email protected]' as from address and sending it, eventhough I supply a different from-address while sending that specific email. How do I fix this?

+1  A: 

EMAIL_HOST_USER is only used for authentication on the mail server.

You probably need to also set DEFAULT_FROM_EMAIL.

Van Gale
In my case DEFAULT_FROM_EMAIL is also set to EMAIL_HOST_USER. But having a case where any website user sends an message(from his email-id) to some other user, is so common. So why wouldn't django allow that. And certainly it has to be different from website's DEFAULT_FROM_EMAIL or EMAIL_HOST_USER!.
Maddy
Maddy, can you show me the source code line where you are sending the email? The standard django send_mail function has an argument for the from address, so I would need to see your code to answer further. Thanks!
Van Gale