Answer the question
In order to leave comments, you need to log in
How to check mail by imap in Go?
No matter how simple the task may seem, I can't get mail via imap.
With tlc.Dial("tcp", "imap.gmail.com:993", nil) - the connection is obtained.
But when requesting to another mail server (port 143), the error tls falls out: oversized record received with length 19232
On the STARTTLS server.
All email clients work fine with it.
If anyone knows how to solve the problem - I will be grateful.
Also, if someone can advise a library for working with imap, it will also be appropriate.
PS There is no access to the server. So there's nothing to edit on it
Answer the question
In order to leave comments, you need to log in
And how do you initiate the connection to the encrypted channel before checking the mail?
you can try
tls.Dial("tcp", "imap.yourserver.com:143", &tls.Config{
InsecureSkipVerify: true,
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question