Lumpy

Sends an email to a single recipient straight to his MTA


License
MIT
Install
pip install Lumpy==0.3.1

Documentation

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()