IMAP or POP3 with SSL
To securly connect your HostGator Webmail account using SSL, you need to replace your normal mail.domain.com URL with the hostname of the server. This hostname must be used for incoming/outgoing certificate domain.
Exploring Your Server's Secure Hostname
HostGator makes use of wildcard SSL certificates which cover the .hostgator.com on Shared accounts and the .websitewelcome.com on Reseller accounts. These certificates allows you to use your regular server name with secure services without any errors.
Shared Web Hosting
Open your domain's webmail in any browser and Login to your cPanel account
Go through your cPanel's left hand menu to find your server name:
The hostname will be displayed as gator####. It will allow you to create a secure connection by appending .hostgator.com to it. Using the above example, your IMAP Server Host Name would be: gator4054.hostgator.com