Hi Ian,
SMTP port 587 is for SMTP-with-STARTTLS, which is good. However, port 993 is for IMAP-over-TLS, not IMAP-with-STARTTLS. You might have more luck with port 143 there (stunnel should do the STARTTLS bit for you, although it's always worth making sure).
-- Mike