Testing mail using cURL

IMAP(S):

Other protocols are similar.