DigitalOcean + Siteground Email via port 465 won’t work (2525 will work)

סיכום מבוסס בינה מלאכותית

PackElend is experiencing issues with sending emails from a Discourse instance hosted on DigitalOcean using Siteground’s SMTP server. Despite configuring the app with DISCOURSE_SMTP_ADDRESS and DISCOURSE_SMTP_PORT, emails fail to send via port 465, resulting in a Net::ReadTimeout error. Testing via swaks shows that port 2525 works, and an email was successfully sent once, though it originated from an old hostname instead of the new one. The user is confused, as the same configuration works with port 2525 but not 465, and the email sender address doesn’t match the expected one. PackElend notes that swaks confirms the SMTP credentials work with port 465 and TLS, suggesting a possible configuration or server-side issue.

Hello,
I started a discourse droplet on digital ocean, what is basically the discourse docker image.
It worked well until I reached the registration step

We sent an activation mail to ** admin.discourse@ourdomain.coop**

but the email never arrived

tail -f /var/discourse/shared/standalone/log/rails/production.log
Sent mail to admin.discourse@ourdomain.coop (61113.9ms)
Job exception: Net::ReadTimeout

so I check if I can send an email via telnet, what worked well but only if using AUTH PLAIN as described on Using Telnet with an SMTP Server – That's Geeky
then it turned out there is a bug as described in
https://stackoverflow.com/questions/42272644/why-do-i-get-done-after-auth-login-command

First I changed to port 2525 and I got the email [Discourse] Confirm your new account so I rebuild the app with new password verifying via https://www.base64encode.net/ but once again Job exception: Net::ReadTimeout
so I changed again to 2525 but no email arrives but

tail -f /var/discourse/shared/standalone/log/rails/production.log
Sent mail to admin.discourse@ourdomain.coop (61113.9ms)

without Job exception: Net::ReadTimeout

I’M LOST HERE

DISCOURSE_SMTP_ADDRESS: itm13.siteground.biz
DISCOURSE_SMTP_PORT: 465
DISCOURSE_SMTP_USER_NAME: admin.discourse@ourdomain.coop
DISCOURSE_SMTP_PASSWORD: MyPassword
DISCOURSE_SMTP_ADDRESS: mail.ourdomain.coop 
DISCOURSE_SMTP_PORT: 2525
DISCOURSE_SMTP_USER_NAME: admin.discourse@ourdomain.coop
DISCOURSE_SMTP_PASSWORD: MyPassword

no parenthesis, Quotation marketc. used!

swaks --to myemail@ourdomain.coop--from admin.discourse@ourdomain.coop --server itm13.siteground.biz --auth LOGIN --auth-user admin.discourse@ourdomain.coop -tls

swaks --to myemail@gmail.com--from admin.discourse@ourdomain.coop --server itm13.siteground.biz --auth LOGIN --auth-user admin.discourse@ourdomain.coop -tls

works

I have just noticed, that the emails send from (that very only time) comes from a different sender than in app.yml set. It is the old hostname, not the new one I’m using for testing, although I’ve been working with the new one only.