gpt4 book ai didi

ssl - 使用 QuikSoft 的 EasyMail .Net 3.0 连接到 pop.gmail.com 时出现异常

转载 作者:太空宇宙 更新时间:2023-11-03 15:05:42 25 4
gpt4 key购买 nike

我正在使用这段代码(使用的端口是995):

Private Shared Function ConnectToPop3Server(ByVal pop3Obj As POP3, ByVal sslObj As SSL) As Boolean

Utils.LogInformation(String.Format("Starting."))
Try
If My.Settings.UseSSL Then
' use SSL only if the configuration says so
sslObj.CredentialVerification = CredentialVerification.None
pop3Obj.Connect(My.Settings.EmailServer, My.Settings.IncomingPortSsl, sslObj.GetInterface())
Else
pop3Obj.Connect(My.Settings.EmailServer, My.Settings.IncomingPort)
End If
'Catch Easy Mail POP3 exception errors
Catch POP3LicenseExcep As Quiksoft.EasyMail.POP3.LicenseException
Utils.LogError("POP3 License Exception: " + POP3LicenseExcep.ToString()) : Return False
Catch AuthExcep As Quiksoft.EasyMail.POP3.POP3AuthenticationException
Utils.LogError("Authentication Exception: " + AuthExcep.ToString()) : Return False
Catch ConnectExcep As Quiksoft.EasyMail.POP3.POP3ConnectionException
Utils.LogError("Connection Exception: " + ConnectExcep.ToString()) : Return False
Catch ProtocolExcep As Quiksoft.EasyMail.POP3.POP3ProtocolException
Utils.LogError("Protocol Exception: " + ProtocolExcep.ToString()) : Return False
'Catch parse exception errors
Catch ParseLicenseExcep As Quiksoft.EasyMail.Parse.LicenseException
Utils.LogError("Parse License Exception: " + ParseLicenseExcep.ToString()) : Return False
Catch InputStreamExcep As Quiksoft.EasyMail.Parse.InputStreamException
Utils.LogError("Input Stream Exception: " + InputStreamExcep.ToString()) : Return False
Catch OutputStreamExcep As Quiksoft.EasyMail.Parse.OutputStreamException
Utils.LogError("Output Stream Exception: " + OutputStreamExcep.ToString()) : Return False
Catch ParseExcep As Quiksoft.EasyMail.Parse.ParsingException
Utils.LogError("Parsing Exception: " + ParseExcep.ToString()) : Return False
' catch SMTP exceptions
Catch ex As Exception
Utils.LogError("Exception: " + ex.Message + " - " + ex.StackTrace.ToString()) : Return False
End Try
Utils.LogInformation(String.Format("Finnished."))
Return True

End Function

这基本上是密切关注随库提供的示例。当调用 pop3Obj.Connect 时,我得到了这个

Quiksoft.EasyMail.SSL.SSLConnectionException: Error receiving data from socket.  ---> Quiksoft.EasyMail.POP3.POP3ConnectionException: Error reading from stream. ---> Quiksoft.EasyMail.SSL.ᜀ: Unable to decrypt message.-2146893055
at Quiksoft.EasyMail.SSL.Internal.ᜒ.᜕(Byte[] A_0, Int32 A_1, Int32 A_2, SocketFlags A_3)
at Quiksoft.EasyMail.SSL.Internal.ᜒ.ᜣ(Byte[] A_0, Int32 A_1, SocketFlags A_2)
at Quiksoft.EasyMail.Internal.᝭.ᜂ()
--- End of inner exception stack trace ---
at Quiksoft.EasyMail.Internal.᝭.ᜂ()
at Quiksoft.EasyMail.Internal.᝭.ᜄ()
at Quiksoft.EasyMail.SSL.Internal.ᜒ.ᜅ(String& A_0, Int32 A_1)
--- End of inner exception stack trace ---
at Quiksoft.EasyMail.SSL.Internal.ᜒ.ᜅ(String& A_0, Int32 A_1)
at Quiksoft.EasyMail.POP3.POP3.Connect(String POP3Server, Int32 Port)
at Quiksoft.EasyMail.POP3.POP3.Connect(String POP3Server, Int32 Port, Object SSLInterface)
at Calico.InboxMonitorService.Service.ConnectToPop3Server(POP3 pop3Obj, SSL sslObj) in C:\DefaultCollection\AlertCustomizations\Calico\WorkOrdersMonitor\Service.vb:line 205

任何人都对这个包有经验并且可以提供一些建议吗?

最佳答案

在终于与 Quiksoft 取得联系后,发现我必须更新到 ver。 3.0.1.23 组件。所有 Ssl 连接错误都消失了。

关于ssl - 使用 QuikSoft 的 EasyMail .Net 3.0 连接到 pop.gmail.com 时出现异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9843355/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com