Thanks for your feedback. I downloaded it and it fixed my gmail problem with IMAP. However, it seems broke EWS exchange server.
I have an EWS Exchange server, which I can get folder and emails using Aspose.Email, version 2.4.0.0. Now I got the following exception when I try to call client.GetMailboxInfo(), where client is an ExchangeWebServiceClient. Could you please take a look? Thanks.
System.Net.WebException was caught
HResult=-2146233079
Message=The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
Source=System.Web.Services
StackTrace:
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Aspose.Email.Exchange.Schema.ExchangeServiceBinding.GetFolder(GetFolderType GetFolder1)
at Aspose.Email.Exchange.ExchangeWebServiceClient.GetMailboxInfo(String mailbox, Int64& mailboxSize)
at Aspose.Email.Exchange.ExchangeWebServiceClient.GetMailboxInfo()
at Aspose.Email.Exchange.ExchangeWebServiceClient.GetMailboxInfo(String mailbox)
at KnowledgeLake.Capture.Server.Import.ImportSourceEmail.Exchange.ExchangeServiceModel.GetExchangeServerType(ExchangeClientConfig config, String plainPassword) in c:\Code\Import Server 5.x (Scrum)\ImportServer\KnowledgeLake.Capture.Server.Import.ImportSourceEmail\Exchange\ExchangeServiceModel.cs:line 244
InnerException: System.Security.Authentication.AuthenticationException
HResult=-2146233087
Message=The remote certificate is invalid according to the validation procedure.
Source=System
StackTrace:
at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.ConnectStream.WriteHeaders(Boolean async)
InnerException: