gen-smtp / gen_smtp

The extensible Erlang SMTP client and server library.
Other
683 stars 266 forks source link

Don't crash SMTP client when TLS is optional and we failed to handshake #258

Closed seriyps closed 3 years ago

seriyps commented 3 years ago

send_it expects that try_smtp_sessions returns {ok, Sock}, but in "restart without TLS" scenario it would return just Sock.

I'm quite surprized that Dialyzed did not complain.

This scenario have not been covered by tests, so, a new test was added.

mworrell commented 3 years ago

So much for Dialyzer.... good catch!