1
0
mirror of https://github.com/bitwarden/server.git synced 2025-01-22 21:51:22 +01:00

start tls mail config

This commit is contained in:
Kyle Spearrin 2019-04-10 08:44:58 -04:00
parent fa463843bb
commit 5cc0b19da8
2 changed files with 3 additions and 1 deletions

View File

@ -116,6 +116,7 @@ namespace Bit.Core
{
public string Host { get; set; }
public int Port { get; set; } = 25;
public bool StartTls { get; set; } = false;
public bool Ssl { get; set; } = false;
public bool SslOverride { get; set; } = false;
public string Username { get; set; }

View File

@ -67,7 +67,8 @@ namespace Bit.Core.Services
client.ServerCertificateValidationCallback = (s, c, h, e) => true;
}
if(!_globalSettings.Mail.Smtp.Ssl && _globalSettings.Mail.Smtp.Port == 25)
if(!_globalSettings.Mail.Smtp.StartTls && !_globalSettings.Mail.Smtp.Ssl &&
_globalSettings.Mail.Smtp.Port == 25)
{
await client.ConnectAsync(_globalSettings.Mail.Smtp.Host, _globalSettings.Mail.Smtp.Port,
MailKit.Security.SecureSocketOptions.None);