Django: SMTPRecipientsRefused: Sender address rejected: not owned by user

I have a Django app running on a server with uWSGI and nginx.

In my local_settings.py file I have this:

###############
# EMAIL SETUP #
###############
EMAIL_HOST = 'smtp.privateemail.com'
EMAIL_HOST_USER = 'support@mydomain.com'
EMAIL_HOST_PASSWORD = 'MY EMAIL PASSWORD'
EMAIL_PORT = 465
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True


########################
# OTHER EMAIL SETTINGS #
########################
ADMIN_EMAIL = "admin@mydomain.com"
SUPPORT_EMAIL = "support@mydomain.com"
DEFAULT_FROM_EMAIL = ADMIN_EMAIL
SERVER_EMAIL = ADMIN_EMAIL

I run python manage.py runserver on my local machine in the Django project's virtual environment. I fill out the password reset form at password_rest/ using the email my.personal@gmail.com and submit it. I get this error.

SMTPRecipientsRefused: {u'my.personal@gmail.com': (553, '5.7.1 <admin@mydomain.com>: Sender address rejected: not owned by user support@mydomain.com')}

My website's email provider is Namecheap.

Why do I get this error when testing on my local machine? What must I change/add to get rid of it? How do authenticate my website's mail service?

2 Replies

I changed EMAIL_HOST to 'mail.privateemail.com'. Email successfully sends when using my local machine. But not on Linode server. I'll make a new thread for the new problem.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct