V8 secure IMAP not working at all

At least v7 worked most of the time. v8 broke all email completely. After adding any new account, all I get is the red exclamation on the account in the left pane. This is true of Google (gmail) and Microsoft (Outlook/Hotmail).

Enabling logs shows the same error message no matter what type of account I try to use:

        12:05:15.482|033| >>> COMMAND CONNECTION EXCEPTION (retry: True): MailClient.Accounts.ConnectionException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
     ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
     ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.
       --- End of inner exception stack trace ---
       at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
       at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token)
       at System.Net.FixedSizeReader.ReadPacketAsync(Stream transport, AsyncProtocolRequest request)
       at System.Net.Security.SslStream.ThrowIfExceptional()
       at System.Net.Security.SslStream.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
       at System.Net.Security.SslStream.EndProcessAuthentication(IAsyncResult result)
       at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
       at System.Net.Security.SslStream.<>c.<AuthenticateAsClientAsync>b__65_1(IAsyncResult iar)
       at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
    --- End of stack trace from previous location where exception was thrown ---
       at MailClient.Imap.Base.Connection.<>c__DisplayClass69_0.<<ConnectAsync>b__0>d.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at MailClient.Imap.Base.TransportPipe.<>c__DisplayClass31_0.<<UpgradeStreamAsync>b__0>d.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at MailClient.Imap.Base.TransportPipe.UpgradeStreamAsync(Func`2 callback)
       at MailClient.Imap.Base.Connection.ConnectAsync(Func`2 getStream, CancellationToken cancellationToken)
       at MailClient.Imap.Base.Connection.ConnectAsync(Func`2 getStream, CancellationToken cancellationToken)
       at MailClient.Protocols.Imap.ConnectionPoolEntry.ConnectInternalAsync(CancellationToken cancellationToken)
       --- End of inner exception stack trace ---
       at MailClient.Protocols.Imap.ConnectionPoolEntry.ConnectInternalAsync(CancellationToken cancellationToken)
       at MailClient.Protocols.Imap.ConnectionPool.AcquireConnectionAsync(Folder mailFolder, Boolean noSelect)
       at MailClient.Protocols.Imap.ConnectionContext.CreateContextAsync(ImapAccount account)
       at MailClient.Protocols.Imap.ImapFolderSynchronizer.ListFoldersAsync(IListFoldersProgress progress, Folder homeFolder, CancellationToken cancellationToken)
       at MailClient.Protocols.Imap.ImapFolderSynchronizer.GetFolderList(IListFoldersProgress progress, Folder homeFolder, CancellationToken cancellationToken)
       at MailClient.Protocols.Common.FolderSynchronizer.<>c__DisplayClass15_2.<EnqueueGetFolderList>b__1(WorkerStatus status, CancellationToken cancellationToken)
       at MailClient.Protocols.Imap.ImapActionCommand.<>c__DisplayClass12_0.<.ctor>b__0(WorkerStatus ws, CancellationToken ct)
       at MailClient.Protocols.Imap.ImapActionCommand.ExecuteInternalSync(WorkerStatus status)
       at MailClient.Protocols.Imap.ImapActionCommand.Execute(WorkerStatus status)

The only thing that actually works is Exchange. If I use a different system like Windows 10 Mail, Outlook or Mailspring, it works fine. It may finally be time to switch to Mailspring.

New version out today… not sure what it fixes as the description is a REPEAT of the prior version… SLOPPY work so be sure to do a backup first.

1 Like

New version has not fixed this problem to be sure. I’ve already tried on multiple computers.

Well I thought it might be worth a try, since you made no mention of what version you were using. Many do not know that the “check for updates” does not work!

1 Like

@Gary nailed my problem at least. Turns out Avast Mail Shield does not like emClient v8 for some reason. Not sure why yet, but disabling Avast Mail Shield allowed emClient v8 to connect to IMAP accounts and pull in mail. Once the initial connection is done, enabling Mail Shield appears to work again. Never experienced this problem with previous versions of emClient. I’ve had the same mail accounts for a long time, and used emClient with Avast since v6 as well.

1 Like

Okay, key difference here appears to be that emClient v8 manages certificates in a different way than v7 and prior. Avast automatically adds its root certificate authority to the Windows system certificate store, but Avast v8 no longer appears to use that cert store. I had to manually add the Avast Mail Shield certificate to emClient’s (separate) certificate store and then the mail shield worked.

Bah! Nevermind, that only appears to have fixed it temporarily. The same problem is back even though I’ve imported Avast’s Web Shield root certificate into the emClient’s certificate store. There appears to be some type of incompatibility here that I’ve yet to be able to pinpoint. :frowning:

Turns out the suggestion on Problem with Avast Mail agent seems to have fixed my issue. Avast doesn’t like the “double IMAP send” from both sending the message and trying to store it in the Sent folder. The server appears to put it in the sent folder anyway, so no reason to have this setting enabled. At least it appears to have fixed the problem. I should probably wait 24 hours before posting this… :wink:

I turned off my virus scanner email portion for a few minutes and was able to receive email yesterday. I also downloaded the bug fix update from July 13. Once the virus scanner turned email back on my Gmail stopped working.

This morning I turned off virus scanner email and received all my email. I was also prompted for a certificate which I installed, once that was completed I am now getting gmail without having to turn off virus scanner email.
Everything appears to be working as it did before the upgrade, I’m cautiously optimistic.

What antivirus do you use? Where were you prompted for a certificate? In emClient or in your antivirus software? I too believe this is cert related, but I’ve been unable to get it working with Avast even though I’ve manually imported Avast’s root certificate authority into emClient’s cert store.

I use AVG antivirus. I was prompted in Emclient for an IMAP certificate, I’ll check with AVG for a certificate to manually upload.

I’m back to the red triangle for Gmail.

Same thing happened to me. Every time I thought I had the problem solved, it would work for a little bit then go bad again. I have my cert properly installed and it doesn’t help one bit:


image

Hello, I opened a ticket with Avast on this - I also was no longer able to connect to gmail after installing version 8. Today it got solved - I had to re-install my Ransomware shield in the end.
https://support.avast.com/en-ww/article/96/#artTitle

Hi, Yokie.

I’ve seen the answer you quote from Avast.
But it seems to be robross0606’s solution also and he says it didn’t work for him.
Could you confirm what works for you?

Thanks much.

Best option in my opinion to avoid these sort of issues is too “not install” AVG or AVAST due to so many peeps have similar issues with these optional programs with (many different mail clients). If you have Windows 10 you don’t need these type of things anyway as the built-in Windows Security works just fine.