Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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