Consolidate at .NET version 4.6.2
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<configSections>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
|
||||
@@ -17,5 +17,12 @@ Public Class Config
|
||||
|
||||
Public Property Debug As Boolean = False
|
||||
|
||||
Public Property TlsVersion As Security.Authentication.SslProtocols = Security.Authentication.SslProtocols.Default
|
||||
Public Class TlsConfig
|
||||
Public Property EnableDefault As Boolean = True
|
||||
Public Property EnableTls1_1 As Boolean = False
|
||||
Public Property EnableTls1_2 As Boolean = False
|
||||
End Class
|
||||
|
||||
|
||||
Public Property TlsVersion As New TlsConfig
|
||||
End Class
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<AssemblyName>DDEmailService</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Console</MyType>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -349,7 +349,9 @@ Public Class EmailService
|
||||
' ======= Connect to server =======
|
||||
|
||||
Dim oOptions As New MailSender.MailSenderOptions() With {
|
||||
.TlsVersion = _Config.TlsVersion
|
||||
.EnableTls1_1 = _Config.TlsVersion.EnableTls1_1,
|
||||
.EnableTls1_2 = _Config.TlsVersion.EnableTls1_2,
|
||||
.EnableDefault = _Config.TlsVersion.EnableDefault
|
||||
}
|
||||
|
||||
Dim oResult = _MailSender.ConnectToServer(oAccount.Server, oAccount.Port, oAccount.Username, oAccount.Password, oAccount.AuthType, oOptions)
|
||||
|
||||
Reference in New Issue
Block a user