hi, I've successfully connected to imap servers without using oauth2 but am now trying to do so with oauth2 (and maybe tls).
My attempt seems to be timing out (but it also seems to be prompting me for input, as though I had called (read-line ...) or something, and I'm not sure why.
I'm not sure I'm using the function as intended; here's some code I'm trying:
(define (connect-to-gmail username access-token)
(printf "Connecting to Gmail IMAP server...\n")
(let ([imap-connection
(imap-connect
"imap.gmail.com"
username
access-token
"INBOX"
;;#:tls? #t
#:try-tls? #t
#:xoauth2? #t
)])
(printf "IMAP connection established.\n")
imap-connection))
The top printf happens, the bottom doesn't and after a minute or two I get:
tcp-connect: connection failed
hostname: imap.gmail.com
port number: 143
system error: Operation timed out; errno=60
I would appreciate pointers from someone who has an idea what I'm doing wrong.
Cheers, Tim