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!
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:
- telnet portquiz.net 465
- telnet golf.mywebsitebox.com 465
Let me know how it goes! Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.