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: 4 months ago
JSON representation
Sends an email to a single recipient straight to the MTA
- Host: GitHub
- URL: https://github.com/jorgebg/lumpy
- Owner: jorgebg
- License: mit
- Created: 2015-02-25T22:34:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-05-12T12:02:22.000Z (over 6 years ago)
- Last Synced: 2025-03-06T19:45:38.010Z (8 months ago)
- Topics: mta, python
- Language: Python
- Homepage: https://pypi.python.org/pypi/Lumpy
- Size: 28.3 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lumpy
[](https://pypi.python.org/pypi/Lumpy)
[](https://travis-ci.org/jorgebg/lumpy)
[](https://requires.io/github/jorgebg/lumpy/requirements/?branch=master)
[](https://coveralls.io/r/jorgebg/lumpy)
[](https://github.com/jorgebg/lumpy/blob/master/LICENSE)
[](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]
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
```python
lumpy.Mail(self,
recipient, sender='jorge@example.com',
subject='Sir! My sir!', body='A message from their majesty.',
port=25, mxrecords=[]
)
```
#### Example
```python
from lumpy import Mail
m = Mail('finn@ooo.land')
m.send()
```