Hi there, Its been days and I am stuck. Whenever I try to send email, I get “502 Bad Gateway” error. Configuration:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'golf.mywebsitebox.com'
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_PORT = 465
EMAIL_USE_TLS = True
I am using Ubunto OS with Nginx and Gunicorn. I have opened ticket twice with this issue but no one is responding. Hope someone here responds.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Hi there @mahawaqar9875,
There are a few things that you need to consider:
If you are using a firewall on your Droplet like UFW, make sure to allow the outgoing TCP traffic for port 465
If you are using a Cloud Firewall, make sure to allow the outgoing TCP traffic for port 465 as well
Once you have opened port 465, test this is actually the case by running the following command from your Droplet:
Let me know how it goes! Regards, Bobby