Open
Description
change literalReadTimeout = 2 * time.Second to test,and read a message with attachments
......
fetchOptions := &imap.FetchOptions{BodySection: []*imap.FetchItemBodySection{{}}}
fetchCmd := c.Fetch(seqSet, fetchOptions)
defer fetchCmd.Close()
......
b, err := io.ReadAll(p.Body)
if err != nil {
log(err) //got log: read tcp 192.168.10.21:62984->xxx.xxx.xxx.xxx:993: i/o timeout
return err //no return,unless delete "defer fetchCmd.Close()"
}
Activity