mirror of
https://github.com/bitwarden/server.git
synced 2025-04-08 06:28:14 -05:00
start tls mail config
This commit is contained in:
parent
fa463843bb
commit
5cc0b19da8
@ -116,6 +116,7 @@ namespace Bit.Core
|
|||||||
{
|
{
|
||||||
public string Host { get; set; }
|
public string Host { get; set; }
|
||||||
public int Port { get; set; } = 25;
|
public int Port { get; set; } = 25;
|
||||||
|
public bool StartTls { get; set; } = false;
|
||||||
public bool Ssl { get; set; } = false;
|
public bool Ssl { get; set; } = false;
|
||||||
public bool SslOverride { get; set; } = false;
|
public bool SslOverride { get; set; } = false;
|
||||||
public string Username { get; set; }
|
public string Username { get; set; }
|
||||||
|
@ -67,7 +67,8 @@ namespace Bit.Core.Services
|
|||||||
client.ServerCertificateValidationCallback = (s, c, h, e) => true;
|
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,
|
await client.ConnectAsync(_globalSettings.Mail.Smtp.Host, _globalSettings.Mail.Smtp.Port,
|
||||||
MailKit.Security.SecureSocketOptions.None);
|
MailKit.Security.SecureSocketOptions.None);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user