To debug that your SSL certificate is not the problem, connect to a ‘public’ service like imap.gmail.com and be sure to check your logs for clues Email error for inbox
edit: Here are more basic troubleshooting tips to try too Can't set up email in local environment
Be sure to followup with what you conclude and learn