'Invalid address when sending mail via Django
I am trying to send mail via Django, but have an error: (501, b'5.1.7 Invalid address', '"emea\\\\sss1ss1"')
My EMAIL_HOST_USER = r'emea\xss1ss1'. As you can see my user consist \x so I am using r''. How to fix it, the real EMAIL_settings are correct.
my view.py
def home(request):
subject = 'Test mailing'
message = 'Hello world!!!'
email_from = settings.EMAIL_HOST_USER
recipient_list = ['[email protected]']
send_mail(subject,message,email_from,recipient_list)
return HttpResponse('Test mailing')
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
