Testing mail using cURL

List messages in the INBOX over IMAP(S):

Send a message over SMTP+STARTTLS: