wireguard-ui icon indicating copy to clipboard operation
wireguard-ui copied to clipboard

Add support for SMTP SSL/TLS encryption

Open gdcooman opened this issue 2 years ago • 3 comments

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!

gdcooman avatar May 04 '22 22:05 gdcooman

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

ymrsmns avatar Jun 17 '22 13:06 ymrsmns

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.

gdcooman avatar Jun 17 '22 14:06 gdcooman

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.

sachilles avatar Jun 25 '22 17:06 sachilles

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.

stale[bot] avatar Sep 04 '22 17:09 stale[bot]

This ticket should be closed only after the corresponding PR has been merged.

sachilles avatar Sep 18 '22 07:09 sachilles