Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lavr/python-emails
Modern python library for emails
https://github.com/lavr/python-emails
Last synced: about 1 month ago
JSON representation
Modern python library for emails
- Host: GitHub
- URL: https://github.com/lavr/python-emails
- Owner: lavr
- License: other
- Created: 2013-08-14T18:53:57.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-01-10T17:56:14.000Z (11 months ago)
- Last Synced: 2024-10-02T01:56:45.286Z (2 months ago)
- Language: Python
- Homepage: http://python-emails.readthedocs.org
- Size: 1.51 MB
- Stars: 401
- Watchers: 17
- Forks: 54
- Open Issues: 21
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
- Authors: AUTHORS.rst
Awesome Lists containing this project
README
python-emails
~~~~~~~~~~~~~Modern python library for email.
Build message:
.. code-block:: python
>>> import emails
>>> message = emails.html(html="Hi!
Here is your receipt...",
subject="Your receipt No. 567098123",
mail_from=('Some Store', '[email protected]'))
>>> message.attach(data=open('bill.pdf', 'rb'), filename='bill.pdf')send message and get response from smtp server:
.. code-block:: python
>>> r = message.send(to='[email protected]', smtp={'host': 'aspmx.l.google.com', 'timeout': 5})
>>> assert r.status_code == 250and more:
* DKIM signature
* Render body from template
* Flask extension and Django integration
* Message body transformation methods
* Load message from url or from file|
Documentation: `python-emails.readthedocs.org `_
Flask extension: `flask-emails `_
|
|.. image:: https://github.com/lavr/python-emails/workflows/Tests/badge.svg?branch=master
:target: https://github.com/lavr/python-emails/actions?query=workflow%3ATests.. image:: https://img.shields.io/pypi/v/emails.svg
:target: https://pypi.python.org/pypi/emails.. image:: https://coveralls.io/repos/lavr/python-emails/badge.svg?branch=master
:target: https://coveralls.io/r/lavr/python-emails?branch=master