go-gomail / gomail

The best way to send emails in Go.
MIT License
4.34k stars 574 forks source link

disable automatic starttls #161

Closed glaszig closed 2 years ago

glaszig commented 2 years ago

if this project is not dead, can we get an option to explicitly disable the automatic STARTTLS behavior like ruby's net/smtp offers?

background: i have to deal with a server that claims starttls support but actually does not. this is internal tooling so i know what i'm doing sending unencrypted data to this server.

https://github.com/go-gomail/gomail/blob/81ebce5c23dfd25c6c67194b37d3dd3f338c98b1/smtp.go#L81-L88

and no, setting Dialer.SSL to true does not help because it does and triggers other things.

glaszig commented 2 years ago

closing in favor of this fork: https://github.com/go-mail/mail