[racket-dev] [PATCH] STARTTLS and TLS support in net/imap
Thanks!
I've adjusted your patch to add `#:tls?' (defaults to #f) and
`#:try-tls?' (defaults to #t) arguments to `imap-connect' and
`imap-connect*'.
You can check my changes here, to help make sure that I didn't mangle
it:
https://github.com/plt/racket/blob/master/collects/net/imap.rkt
At Sat, 03 Mar 2012 20:20:48 +0000, Thomas Spurden wrote:
> I've just started learning Racket and as a first task wanted to scape my
> IMAP mail boxes. One of my accounts requires STARTTLS and the other
> (gmail) requires a connection over SSL. I wrote a simple modification
> to net/imap so it automatically switches to TLS if the server
> capabilities include STARTTLS, and provides a new function
> imap-connect-tls to connect via TLS. It seems to work fine on my two
> IMAP accounts.
>
> I'm not very happy with the has-starttls? function, but am not sure how
> to avoid the set!.
>
> I'm not sure whether it is better to create a new imap 'object' using
> make-imap after switching to TLS (which is what I've done) or to modify
> the existing 'object' (which doesn't seem very functionaly).
>
> The patch is against Racket 5.2.1.
>
> (Please keep me CC'ed as I'm not subscribed to the list)
>
> --
> Thomas Spurden
>
> ------------------------------------------------------------------------------
> [text/x-patch "imap-tls.patch"] [~/Desktop & open] [~/Temp & open]
> _________________________
> Racket Developers list:
> http://lists.racket-lang.org/dev