New submission from Rares Vernica:

smtplib does not support connections through a proxy. The accepted workaround 
is something like:

```
import smtplib
import socks

socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS4, proxy_host, proxy_port)
socks.wrapmodule(smtplib)

smtp = smtplib.SMTP()
```

The side-effects of `socks.wrapmodule` impact other libraries which don't need 
to use the proxy, like `requests`. See here for a disucssion 
https://github.com/kennethreitz/requests/issues/3890

----------
components: Library (Lib)
messages: 288765
nosy: rares
priority: normal
severity: normal
status: open
title: smtplib does not support proxy

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29687>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to