Skip to main content

Newsletter module with customizable, scheduler and self-database

Project description

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="me@example.com",
        password="password",
        host="smtp.example.com",
        port=123,
    ),
    enl.Database()
)
  
root.add_subscriber(
    [
        enl.Subscriber("tesla@example.com"),
        enl.Subscriber("feynman@example.com"),
    ],
)
  
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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easynewsletter-0.1.2.tar.gz (17.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page