Skip to content
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

Configure tls_certificate_check for tls config in swoosh #1254

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

oestrich
Copy link
Contributor

OTP 26 changed the error level of what we're seeing when trying to send email to SES via TLS. This additional configuration should let us communicate via TLS without issues.

See gen-smtp/gen_smtp#328

OTP 26 changed the error level of what we're seeing when trying to send
email to SES via TLS. This additional configuration should let us
communicate via TLS without issues.

See gen-smtp/gen_smtp#328
@@ -293,6 +293,7 @@ if config_env() == :prod do
password: System.fetch_env!("SMTP_PASSWORD"),
ssl: System.get_env("SMTP_SSL", "false") == "true",
tls: :always,
tls_options: :tls_certificate_check.options(System.fetch_env!("SMTP_SERVER")),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this affect if System.get_env("SMTP_SSL", "false") == "false"? As in if its disabled and we still include SSL options, will things blow up?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do have tls: :always right below ssl: false which I'm not sure what the difference is.

It seems like the difference is ssl: false won't immediately try to start ssl, vs using starttls since we have tls: :always That's my read of the docs though https://github.com/gen-smtp/gen_smtp?tab=readme-ov-file#options

@oestrich oestrich merged commit c670983 into main Mar 25, 2024
2 checks passed
@oestrich oestrich deleted the tls-certificate-check-email branch March 25, 2024 17:23
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.

2 participants