我正在使用这段代码(使用的端口是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
任何有此套装经验的人都可以提供一些建议吗?
答案 0 :(得分:0)
最终与Quiksoft取得联系之后,事实证明我必须更新到该版本。 3.0.1.23程序集。所有Ssl连接错误都消失了。