Sends an email to a single recipient straight to his MTA
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lumpy
scripts
.coveragerc
.gitignore
.travis.yml
LICENSE
Makefile
README.md
setup.cfg
setup.py
test_lumpy.py

README.md

Lumpy

Pypy Build Status Requirements Status Coverage Status MIT License

Stories in Ready

Sends an email to a single recipient straight to his MTA. Looks up for the MX DNS records of the recipient SMTP server and attempts the delivery through them.

Requirements

  • Python 2.7+

Install

sudo pip install lumpy

Usage

usage: lumpy [-h] [--from [SENDER]] [--subject [SUBJECT]] [--body [BODY]]
[--port [PORT]] [--mxrecords [MXRECORDS]] [--verbose]
recipient@example.com

positional arguments:
  recipient@example.com

optional arguments:
  -h, --help            show this help message and exit
  --from [SENDER], -f [SENDER]
  --subject [SUBJECT], -s [SUBJECT]
  --body [BODY], -b [BODY]
  --port [PORT], -p [PORT]
  --mxrecords [MXRECORDS], --mx [MXRECORDS], -m [MXRECORDS]
                          List of comma-separated mx records
  --verbose, -v

Examples

lumpy finn@ooo.land
lumpy finn@ooo.land -s "Sir! My sir!"
lumpy jake@ooo.land -s "Sir! My sir!" -f queen@lumpy.space
lumpy jake@ooo.land -s "Sir! My sir!" -m "A message from their majesty."
lumpy bmo@ooo.land --mx smtp1.ooo.land,smtp2.ooo.land

Programmatically

Method signature

lumpy.Mail(self,
      recipient, sender='jorge@example.com',
      subject='Sir! My sir!', body='A message from their majesty.',
      port=25, mxrecords=[]
)

Example

from lumpy import Mail
m = Mail('finn@ooo.land')
m.send()