Skip to content

feat: client tls_options/sockopts spec, check ssl and tls#351

Open
MarkoMin wants to merge 1 commit intogen-smtp:masterfrom
MarkoMin:client_options_specs
Open

feat: client tls_options/sockopts spec, check ssl and tls#351
MarkoMin wants to merge 1 commit intogen-smtp:masterfrom
MarkoMin:client_options_specs

Conversation

@MarkoMin
Copy link

@MarkoMin MarkoMin commented Apr 3, 2025

Just recently I tried to use this lib to send some mails through existing SMTP server and I've stumbled upon few things:

  1. Correct me if I'm wrong, but based on this reply and my own experience, it's not possible to establish a connection to SMTP server when both ssl and tls options are set. We must choose only one of them. That's why I've added chech_ssl_optionss/2 When ssl is set to true and tls to always I get {missing_requirement, Host, tls} error. When I choose only one, sending succeeds.
  2. sockopts can be [tls_client_options()] when ssl is set to true. This doesn't help very much to dialyzer, but it does to the documentation.
  3. tls_options specified more correctly (guess that those types weren't exposed when defining gen_smtp_client:options/0 type.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant