3 months ago
I am running a Django and Celery project on a Pro Plan account.
I use the Celery worker to send emails via SMTP using Gmail on port 465 with SSL.
However, every time the worker tries to send an email, the connection is instantly dropped and I get this error in the logs:
smtplib.SMTPServerDisconnected: please run connect() first.
Since I am on the Pro Plan, I understand that outbound SMTP ports should be open. Its because the ports are closed, or if there is any internal firewall rule dropping this connection?
Thank you!
Pinned Solution
3 months ago
did you try SSHing into the worker to test reachability to the SMTP host directly..?Also is your Django email config correct..?
4 Replies
dharmateja
Did you upgrade to pro after deploying worker?
3 months ago
No, already in Pro when deployed
matheushacksv
No, already in Pro when deployed
3 months ago
did you try SSHing into the worker to test reachability to the SMTP host directly..?Also is your Django email config correct..?
dharmateja
did you try SSHing into the worker to test reachability to the SMTP host directly..?Also is your Django email config correct..?
3 months ago
You were spot on! I ran the SSH test and the network was fine. Then I checked my settings and saw I had forgotten to pass the email variables to the worker container. It is all fixed and sending emails now. Thanks!
Status changed to Solved chandrika • 3 months ago
