mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Makes upgrade to Mailkit fully backward compatible
This commit is contained in:
@@ -37,7 +37,7 @@ namespace Orchard.Email.Models {
|
|||||||
public SmtpEncryptionMethod EncryptionMethod {
|
public SmtpEncryptionMethod EncryptionMethod {
|
||||||
#pragma warning disable CS0618 // Type or member is obsolete
|
#pragma warning disable CS0618 // Type or member is obsolete
|
||||||
// Reading EnableSsl is necessary to keep the correct settings during the upgrade to MailKit.
|
// Reading EnableSsl is necessary to keep the correct settings during the upgrade to MailKit.
|
||||||
get { return this.Retrieve(x => x.EncryptionMethod, EnableSsl ? SmtpEncryptionMethod.SslTls : SmtpEncryptionMethod.None); }
|
get { return this.Retrieve(x => x.EncryptionMethod, EnableSsl ? (Port == 587 ? SmtpEncryptionMethod.StartTls : SmtpEncryptionMethod.SslTls) : SmtpEncryptionMethod.None); }
|
||||||
#pragma warning restore CS0618 // Type or member is obsolete
|
#pragma warning restore CS0618 // Type or member is obsolete
|
||||||
set { this.Store(x => x.EncryptionMethod, value); }
|
set { this.Store(x => x.EncryptionMethod, value); }
|
||||||
}
|
}
|
||||||
@@ -82,4 +82,4 @@ namespace Orchard.Email.Models {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user