(553, b'Relaying disallowed as webmaster@localhost')
I'm trying to send a password reset email on Django web app using the Zoho SMTP but it keeps throwing this error when I use Gmail.
Below are some snippets
Views.py
def post(self, request):
name = request.POST['Name']
email = request.POST['Email']
phone = request.POST['Phone']
message = request.POST['Message']
email_msg = EmailMessage(
subject='New Enquiry',
body=message + phone,
from_email='noreply@domain.com',
to=['support@domain.com'],
)
email_msg.send()
settings.py
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.zoho.com'
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''