When running the code to connect to Gmail provided by TLama on How to login to a Gmail account and get number of messages in a mailbox with TIdIMAP4? it works wonderfully well in Delphi 5 and Delphi 2007.
I try the same code on Delphi XE3, but strange enough I got 'Socket Error #10061 Connection refused' error when in the IDE or when I launch the exe generated in the \win32\debug directory directly from the file explorer. If I launch the .exe generated in the \Win32\release directory it works correctly!
I tried to put the ssleay32.dll and libeay32.dll in all sort of directories but it still doesn't work and I'm not sure it's related to that.
Indy on Delphi XE3 is version 10.5.9.0. (what originally shipped with my Delphi XE3 Update 1).
Any help greatly appreciated!