Hi! I’m sorry if this issue has already a clear solution; I’ve really looked around and haven’t found a clear solution to my problem.
So, I self-hosted a discord instance and after some fiddling got the correct configuration for SMTP, but mails to new users don’t send (not even to the initial admin user; I ended up creating one with the rake command inside the container).
At first I thought it wouldn’t be able to connect to the SMTP due to some DNS shenaningans, since when messing around with ./discourse-doctor and eventually entering the container shell it returns:
Testing sending to xxxx@gmail.com using smtp-relay.brevo.com:587, username:xxxxxxx@smtp-brevo.com with plain auth.
======================================== ERROR ========================================
Connection to port 587 failed.
====================================== SOLUTION =======================================
The most likely problem is that your server has outgoing SMTP traffic blocked.
If you are using a service like Mailgun or Sendgrid, try using port 2525.
=======================================================================================
However, the openssl command recommended on the SMTP troubleshooting guide not only connected, but I was able, with EHLO , AUTH LOGIN and all those commands (which I didn’t know existed until now, heh ^^') to send a test email to myself from inside the container itself. So I don’t think the problem is the container being incapable of connecting with the SMTP server.
EDIT FOR CLARITY
I was able to do this from within the container: I logged into the container using the./launcher enter container
command. From that prompt I did the former commands.
Here are my SMTP settings, if it helps. I edited out the login info, of course.
DISCOURSE_SMTP_ADDRESS: 'smtp-relay.brevo.com'
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: 'xxxxxxxx@smtp-brevo.com'
DISCOURSE_SMTP_PASSWORD: 'xxxxxxxxxxxx'
#DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
#DISCOURSE_SMTP_DOMAIN: discourse.example.com # (required by some providers)
DISCOURSE_NOTIFICATION_EMAIL: 'noreply@mydomain.xyz' # (address to send notifications from)
#DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none
The notification email was the one I tested via the openssl command, and the last line I read it somewhere in another post and added it, but commented it out and never tried it because it was an old post.
Anyway, I’m really lost here, I hope someone can give me a hand, and I’m really sorry if this was a solved issue I didn’t find!