Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jorgebg/lumpy

Sends an email to a single recipient straight to the MTA
https://github.com/jorgebg/lumpy

mta python

Last synced: about 2 months ago
JSON representation

Sends an email to a single recipient straight to the MTA

Awesome Lists containing this project

README

        

# Lumpy

[![Pypy](https://img.shields.io/pypi/v/Lumpy.svg)](https://pypi.python.org/pypi/Lumpy)
[![Build Status](https://travis-ci.org/jorgebg/lumpy.svg)](https://travis-ci.org/jorgebg/lumpy)
[![Requirements Status](https://requires.io/github/jorgebg/lumpy/requirements.svg?branch=master)](https://requires.io/github/jorgebg/lumpy/requirements/?branch=master)
[![Coverage Status](https://coveralls.io/repos/jorgebg/lumpy/badge.svg)](https://coveralls.io/r/jorgebg/lumpy)
[![MIT License](https://img.shields.io/pypi/l/Lumpy.svg)](https://github.com/jorgebg/lumpy/blob/master/LICENSE)

[![Stories in Ready](https://badge.waffle.io/jorgebg/lumpy.svg)](http://waffle.io/jorgebg/lumpy)

Sends an email to a **single recipient** straight to the 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]
[email protected]

positional arguments:
[email protected]

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 [email protected]
lumpy [email protected] -s "Sir! My sir!"
lumpy [email protected] -s "Sir! My sir!" -f [email protected]
lumpy [email protected] -s "Sir! My sir!" -m "A message from their majesty."
lumpy [email protected] --mx smtp1.ooo.land,smtp2.ooo.land
```

### Programmatically

#### Method signature
```python
lumpy.Mail(self,
recipient, sender='[email protected]',
subject='Sir! My sir!', body='A message from their majesty.',
port=25, mxrecords=[]
)
```

#### Example
```python
from lumpy import Mail
m = Mail('[email protected]')
m.send()
```