wireguard-ui
wireguard-ui copied to clipboard
Add support for SMTP SSL/TLS encryption
Hello,
At the moment the encryption for SMTP is hardcoded to STARTTLS. Would it be possible to add support for SSL/TLS encryption as well?
Since the mail package supports this, maybe you could create an environment variable that lets the user set the encryption (like the authType)? I could also create a pull request if you'd prefer that.
Nice application btw!
View read
SMTP_AUTH_TYPE: the authentication type. Possible values: PLAIN, LOGIN, NONE
and STARTTLS disable option
environment:
.....
- SMTP_NO_TLS_CHECK=true
https://github.com/ngoduykhanh/wireguard-ui/blob/87b08a8f7c026e325438b18a1d7384fd33847e5c/main.go#L59
That has nothing to do with my suggestion though. You're suggesting to disable TLS altogether, which is far from desirable.
What I want is for this line:
https://github.com/ngoduykhanh/wireguard-ui/blob/f43c59c0431bd508df40bdf6b62eaee20287c1de/emailer/smtp.go#L53
to not be hardcoded to mail.EncryptionSTARTTLS
, but to let the user decide the encryption type e.g. mail.EncryptionSSLTLS
(see the docs).
Just like the way it's done for the hostname, username, password...
Thanks for the input though.
It would be very helpful to be able to configure either STARTTLS or SSL/TLS since some e-mail provider just allow SSL/TLS and do not support STARTTLS.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This ticket should be closed only after the corresponding PR has been merged.