easynewsletter
easynewsletter copied to clipboard
Newsletter module with customizable, scheduler and self-database
easynewsletter
Newsletter module with customizable, scheduler and self-database. It uses red-mail to send mail and scheduler for schedule.
Features
- A simple API for blanning newsletters
- Customizable self-database
- Multiple message and scheduler support
- Be used in web applications (E.g: with Flask)
- A cross-platform module
- Tested on Python 3.9
Installation
To install easynewsletter, run the following command from the command line:
pip3 install --user easynewsletter
Example
This example sends the "Science Weekly" newsletter to Tesla and Feynman every Monday.
import easynewsletter as enl
root = enl.Newsletter(
enl.Email(
sender="[email protected]",
password="password",
host="smtp.example.com",
port=123,
),
enl.Database()
)
root.add_subscriber(
[
enl.Subscriber("[email protected]"),
enl.Subscriber("[email protected]"),
],
)
message = enl.Message(
subject="Science Weekly",
text="What is evolution?",
)
root.add_rule(message, enl.Schedule.every().monday)
while True:
root.run_pending()
Docs and Changelog
easynewsletter's documentation lives at easynewsletter.readthedocs.io and changelog lives at Changelog.
License
This project is licensed under the GPL-3.0 - see the LICENSE file for details.