Skip to main content

Thin wrapper for Django EmailMessage

Project description

libemail

Installation

  1. Install the app

    pip install libemail
    
  2. Add libemail to INSTALLED_APPS in settings.py file

Usage:

  1. Build the template context

    from libemail.generic import Email, EmailContext
    
    
    email_context = EmailContext(
        title="A simple title",
        subtitle="A descriptive subtitle",
        body="A long enough body, very detailed",
        preview="Preview text that will be displayed on the list view of the mail client",
        branding="A link to a image, white or transparent background",
    )
    
  2. Initialize an email object

    email = Email(subject="A very serious subject", context=email_context, to="some@email.com")
    
  3. Send it!

    email.send()
    

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

libemail-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

libemail-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file libemail-0.1.0.tar.gz.

File metadata

  • Download URL: libemail-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.8 Windows/10

File hashes

Hashes for libemail-0.1.0.tar.gz
Algorithm Hash digest
SHA256 312fdbff70cc712868e7e98f73c16e72aa07395af40398e40241bb89f3562252
MD5 f5a13259e407ff8e3d5881a5158410dd
BLAKE2b-256 7e5967d677806f37cec6de09b8407b22ea7fa26180527fc5c67bc317f00b4d6e

See more details on using hashes here.

File details

Details for the file libemail-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: libemail-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.8 Windows/10

File hashes

Hashes for libemail-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a499edae11f76c052373466b0d7ed1543d90c5573dcaa91f066ea346dd4db1fc
MD5 f45889062c5219b9a2d3a3ff4e4cefcd
BLAKE2b-256 8c4b2f2fd3ef264aa9d1171e4916e8ce0231dddae653293939bc568c828ffced

See more details on using hashes here.

Supported by

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