Get IMAP mail messages : No connection could be made because the target machine actively refused it 22.214.171.124:993
Checked below things first: if you are using imap for smtp server of gmail?
1- Check port 587 is open on your machine or not?
2- your antivirus is blocking the connection to your port?
use port number 993