Sorry for being here, but I came across this question when I had the same problem and have since written a library that adds SSL / TLS support for HaskellNet. It uses another library, a connection that I think did not exist at the time this question was originally published, and which made adding TLS support much easier than before. You can find it here: http://hackage.haskell.org/package/HaskellNet-SSL
I hope this will be useful to anyone who stumbles upon this topic looking for information on connecting to gmail accounts. In fact, for gmail in particular, there is sample code to connect to their IMAP / SMTP servers in the repository .
danielpwright
source share