I try to get all inboxes of incoming messages from email to yahoo, due to many emails per day, yahoo refuses my connections for a while, I want to connect through a proxy when yahoo refuses my actual ip and gives this erro:
Cannot connect to : Can not authenticate to IMAP server: [CLOSED] IMAP connection broken (authenticate).
Is there a way to connect to yahoo IMAP through a proxy? I tried this way but no luck:
import socks
import socket
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS4,proxy_ip,port,True)
socket.socket = socks.socksocket
M = imaplib.IMAP4_SSL("imap.mail.yahoo.com")
a = M.login(user, passwd)
source
share