This error means that although connection to remote email server (IMAP, POP3, SMTP) was successful, SSL negotiation has failed.
How does your code look like?
Are you sure that you are not trying to connect using ConnectSSL method (which uses implicit SSL) to a non SSL port (e.g. ConnectSSL("imap.example.com", 143))?
If so, either use Connect method (which doesn't use SSL) -or- use appropriate SSL port -or- don't specify port at all (this way correct port, default for email protocol you use, will be used).