Skip to main content

An extension of standard smtplib, which supports proxy tunneling

Project description

An extension of standard smtplib, which supports proxy tunneling.

Package works on Python 2.7+ and Python 3.5+.

Using PySocks.


You can install xsmtplib from PyPI by running:

pip install xsmtplib

Or you can just download tarball / clone the repository and run:

python install

Alternatively, include just in your project.


xsmtplib extends standard python smtplib, so it can be used instead without any compatibility issues.

Connection to SMTP server via proxy can be done during instance initialization:

from xsmtplib import SMTP

server = SMTP(host="", proxy_host="")
server.sendmail("", "", "I have an issue. Please help!")

Alternatively, you can connect to SMTP server manually when you need to:

from xsmtplib import SMTP

server = SMTP(timeout=30)
server.connect_proxy(proxy_host="", host="")
server.sendmail("", "", "I have an issue. Please help!")

Known issues

SMTPS (SSL SMTP) and LMTP connections via proxy are not supported yet.


See LICENSE file for more details.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for xsmtplib, version 1.0.1.dev0
Filename, size File type Python version Upload date Hashes
Filename, size xsmtplib-1.0.1.dev0.tar.gz (16.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page