I am running into an issue trying to use my campus\'s SMTP server with my Rails 5.x app. I receive the following error: SSL_connect returned=1 errno=0 state=SSLv2/v3 read se
port: 587,
...
tls: true,
enable_starttls_auto: true
According to the documentation ":ssl/:tls - Enables the SMTP connection to use SMTP/TLS (SMTPS: SMTP over direct TLS connection)". But port 587 is not for direct TLS but for TLS upgrade via the STARTTLS command. Direct TLS is done on port 465 instead if enabled.
Thus, your client tries to access a non-TLS connection with TLS and this results in this strange error. See also my explanation on a similar question where this happened with Perl not Ruby.
To solve the problem either use port 465 with tls
(if enabled on the server) or use port 587 and rely on enable_starttls_auto
that it will do a later upgrade to TLS.