This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rares
Recipients rares
Date 2017-03-01.17:29:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1488389372.28.0.822188705276.issue29687@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2017-03-01 17:29:32raressetrecipients: + rares
2017-03-01 17:29:32raressetmessageid: <1488389372.28.0.822188705276.issue29687@psf.upfronthosting.co.za>
2017-03-01 17:29:32rareslinkissue29687 messages
2017-03-01 17:29:32rarescreate