Giter Club home page Giter Club logo

xsmtplib's Introduction

xsmtplib

THE PROJECT IS ARCHIVED. NO ISSUES / PULL REQUESTS CAN BE OPENED. FEEL FREE TO FORK.

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("[email protected]", "[email protected]", "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("[email protected]")
server.sendmail("[email protected]", "[email protected]", "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.

xsmtplib's People

Contributors

nickmasster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.