I should have dug around in sirmail sooner. Armed with the hint about 
parametrize I've now found this:

              (if (get-pref 'sirmail:use-ssl?)
                  (let-values ([(in out) (ssl-connect server port-no)])
                    (imap-connect* in out (USERNAME) passwd mailbox-name))
                  (parameterize ([imap-port-number port-no])
                    (imap-connect server (USERNAME) 
                                  passwd
                                  mailbox-name)))

I guess I naively thought I'd be able to do something like this

    (let-values
        ([(imap-connection messages# nu)
          (parameterize ([imap-port-number port])
                       (imap-connect hostname mailaddress password folder 
#:tls? tls-before? #:try-tls? try-tls?))])

but so far I think it has worked only with an account that uses #:try-tls?, not 
yet for #:tls?.

I had seen 
  
https://docs.racket-lang.org/net/imap.html#%28def._%28%28lib._net%2Fimap..rkt%29._imap-connect%2A%29%29

in the docs, but wasn't sure how to do it. I can try following the example 
above.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to