With a quick look at the documents, I noticed connectStream , which allows you to use an already open stream, as well as the fact that all functions work on BSStream s => s , and not in a simple Handle . I assume that you can use this with the tls package to record a BSStream instance for TLSCtx a (or a new type) to allow you to use a TLS / SSL connection with HaskellNet sendMail .
I have no experience with any package, but it seems that this is possible.
source share