[Haskell-cafe] Sending email

Donn Cave donn at avvanta.com
Mon Apr 18 23:23:49 UTC 2016

quoth David Escobar <davidescobar1976 at gmail.com>

> No explicit mention is made anywhere in the documentation about TLS or even
> SSL, so perhaps not? Some libraries I've come across specifically mention
> that they don't support TLS or SSL. Being relatively new to this part of
> Haskell, what is the most standard library the community uses for email
> that supports modern protocols such as those used by GMail? Thanks.

I'm not going to guess what the community is up to, but it seems
to me like the least novel way to get there would be an SSL connection
to port 465, using HsOpenSSL, and use the library you were already using
for SMTP.

I do that, essentially, though with home rolled stuff for various
not very interesting reasons.  So I haven't tried these two packages,
but I can assure you that the principle works with gmail.

If your SMTP package won't accept some kind of generic I/O channel
and insists on making and using its own socket connection, then
you'll need something else.  Ideally, it would provide pure functions
for SMTP parsing and protocol interpretation, and you could do the
I/O stuff yourself via whatever channel you wish, but that pure/io
structural division seems surprisingly rare among Haskell network
application packages.


More information about the Haskell-Cafe mailing list