Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

xsmtplib

An extension of standard smtplib, which supports proxy tunneling.

Package works on Python 2.7+ and Python 3.5+.

Using PySocks.

Installation

You can install xsmtplib from PyPI by running:

pip install xsmtplib

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

python setup.py install

Alternatively, include just xsmtplib.py in your project.

Usage

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="smtp.example.com", proxy_host="proxy.example.com")
server.sendmail("user@example.com", "admin@example.com", "I have an issue. Please help!")
server.quit()

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

from xsmtplib import SMTP

server = SMTP(timeout=30)
server.set_debuglevel(1)
server.connect_proxy(proxy_host="proxy.example.com", host="smtp.example.com")
server.helo("user@example.com")
server.sendmail("user@example.com", "admin@example.com", "I have an issue. Please help!")
s.quit()

Known issues

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

License

See LICENSE file for more details.

Metadata

Release files for xsmtplib 1.0.1.dev0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xsmtplib 1.0.1.dev0
File Size Uploaded Provenance Actions
xsmtplib-1.0.1.dev0.tar.gz 16.7 kB Without provenance Details for xsmtplib-1.0.1.dev0.tar.gz

Release files / xsmtplib-1.0.1.dev0.tar.gz

Download URL xsmtplib-1.0.1.dev0.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3028e52063429e13cc652d66e8f9f99588055ca86c4b78e4a7fe722d7aa86cd2
BLAKE2b-256 checksum
How to use checksums
34bcd403c94683cec306ddcff1dda2a62daad2d306aea20d6f578436519fe034
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5

Security for xsmtplib 1.0.1.dev0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page