With the help of the socks module, I can send an email through the socks4 / 5 server:
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, 'ip', port) socks.wrapmodule(smtplib) s = smtplib.SMTP_SSL("smtp.mail.ru:465") s.login("log", "pass") How to send mail via http / s proxy?