Исключение при подключении к pop.gmail.com с использованием EasyMail .Net 3.0 от QuikSoft - PullRequest
0 голосов
/ 23 марта 2012

Я использую этот кусок кода (используется порт 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

Кто-нибудь, кто имеет опыт работы с этим пакетом и может дать совет?

1 Ответ

0 голосов
/ 28 марта 2012

После того, как, наконец, связался с Quiksoft, оказалось, что мне нужно обновиться до вер. 3.0.1.23 сборки. Все ошибки подключения Ssl исчезли.

...