Gmail not syncing IMAP error

I am not receiving any mail and getting this error

I am able to get contacts, tasks and calenders but not email

Error log is attached below

Error Log
2:51:54 PM [SMTP]  Connecting: To
2:51:54 PM [IMAP]  Uploading messages: To folder
2:51:54 PM [IMAP]  Synchronizing subfolders: For folder
2:51:54 PM [Google Contacts]  Synchronizing folder list
2:51:54 PM [Google Calendar]  Synchronizing folder list
2:51:55 PM [Google Contacts]  Synchronizing folder ‘’
2:51:58 PM [SMTP]  MailClient.Accounts.SocketException: Connection failed due to the following reason:
2:51:58 PM     “No connection could be made because the target machine actively refused it”
2:51:58 PM    at MailClient.Protocols.Smtp.SmtpSendCommand.Connect(WorkerStatus status)
2:51:58 PM    at MailClient.Protocols.Smtp.SmtpSendCommand.Execute(WorkerStatus status)
2:51:58 PM    at MailClient.Commands.Command.Process(WorkerStatus status)
2:51:58 PM [IMAP]  Uploading messages: Done
2:51:58 PM [IMAP]  MailClient.Accounts.ConnectionException: Failed opening connection to server. —> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it
2:51:58 PM    at System.Net.Sockets.TcpClient…ctor(String hostname, Int32 port)
2:51:58 PM    at MailClient.Imap.Base.Connection.<>c__DisplayClass43_0.b__0()
2:51:58 PM at MailClient.Imap.Base.Connection.Connect(Func`1 getStream)
2:51:58 PM at MailClient.Imap.Base.Connection.Connect(String receiveHost, Int32 receivePort, Boolean explicitSsl)
2:51:58 PM at MailClient.Protocols.Imap.ConnectionPoolEntry.Reconnect(CancellationToken cancellationToken)
2:51:58 PM — End of inner exception stack trace —
2:51:58 PM at MailClient.Protocols.Imap.ConnectionPoolEntry.Reconnect(CancellationToken cancellationToken)
2:51:58 PM at MailClient.Protocols.Imap.ConnectionPoolEntry.Connect(CancellationToken cancellationToken)
2:51:58 PM at MailClient.Protocols.Imap.ConnectionPool.AcquireConnection(Folder mailFolder, Boolean idle, Boolean forStore)
2:51:58 PM at MailClient.Protocols.Imap.Synchronizer.AppendCommand.ExecuteInternal(WorkerStatus status)
2:51:58 PM at MailClient.Protocols.Imap.Synchronizer.ImapCommand.Execute(WorkerStatus status)
2:51:58 PM at MailClient.Commands.Command.Process(WorkerStatus status)

Check your settings in Menu > Tools > Accounts

SMTP: SSL/TLS on special port - legacy (port 465)
IMAP: SSL/TLS on special port - legacy (port 993)


  Thank you for the reply. But I already have tried these settings. Still it does not work.

In fact, These settings do not work even in thunderbird or mail client. Only working in outlook 2016.

IMAP is enabled in GMail?

Yes it is enabled. That’s why Outlook works fine,

It may be that these other applications are blocked by GMail. Could be caused by any number of things like too many attempts to login with incorrect password etc.

Go to the Allow access to your Google account page at Google. If you are not logged in you will be prompted to log in to Google. Use the account for which you are having trouble. Click continue and wait about 5 minutes, then try and sync with eM Client again.

Thanks again. But I have already tried that as well.

If you go do you see eM Client listed?

Yes it is listed

What I would do is remove it from connected apps then remove your GMail account from eM Client, and set it up again.

Hi Gary,
my EM Client Ver. 7.1.33101.0 (free licence) worked beautifully until two days ago.
Starting from 4 September 2018 when I open EM with my Gmail account, and try to synchronize I get the same message and the same extended log. I tried all the things you recommended in this post, but the error is still the same.
Can you help me please?

One thing you could try is to temporarily disable your anti-virus application, then try again.

Thanks Gary,
it was the Kaspersky antivirus!