Net::ReadTimeout when sending email after install

AI-generated summary

The user gpson is experiencing a Net::ReadTimeout error when sending email after installing Discourse. Despite trying various troubleshooting methods, including sending a test email using Python code and checking options from a troubleshooting guide, the issue persists.

gpson suspects an issue with the SMTP configuration and shares their containers/app.yml file. zogstrip suggests manually sending an email from the server using the same credentials to verify the issue.

gpson eventually resolves the issue by changing the SMTP port to 587 and authentication to “login”, revealing that the email provider had provided incorrect port and authentication parameters.

The Problem

I get the error on first registration:

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

What I tried

The question

  • What more can I do?
  • Is it possible to increase the verbosity of the error?

My containers/app.yml :

  ## TODO: List of comma delimited emails that will be made admin and developer
  ## on initial signup example 'user1@example.com,user2@example.com'
  DISCOURSE_DEVELOPER_EMAILS: 'robo@magved.lt'

  ## TODO: The SMTP mail server used to validate new accounts and send notifications
  DISCOURSE_SMTP_ADDRESS: pap.serveriai.lt
  DISCOURSE_SMTP_PORT: 465
  DISCOURSE_SMTP_USER_NAME: robo@magved.lt
  DISCOURSE_SMTP_PASSWORD: topsecret
  DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)
  DISCOURSE_SMTP_AUTHENTICATION: plain
  #DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none

Can you manually (via telnet or similar) send an email from the server using the same credentials?

It is working with these parameters (PORT - 587, AUTHENTICATION - “login”):

  ## TODO: The SMTP mail server used to validate new accounts and send notifications
  DISCOURSE_SMTP_ADDRESS: pap.serveriai.lt
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: robo@magved.lt
  DISCOURSE_SMTP_PASSWORD: topsecret
  DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)
  DISCOURSE_SMTP_AUTHENTICATION: "login"
  DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none

Email provider gave wrong port and authentication parameters.