Skip to main content

Provides easy interface for sending emails through Amazons Simple Email Service.

Project description

UA-Email-Client

Provides easy interface for sending emails through Amazons Simple Email Service.

Motivation

To make a python API that could obfuscate the details of sending emails using AWS SES service.

Code Example

from ua_email_client import ua_email_client

client = ua_email_client.EmailClient(email)
# The template name given should be relative name to a file.
client.add_template("success.html")

# Destinations 
client.send_email(destinations, "success.html", subject, body)

Installation

pip install --user ua-email-client

Tests

NOTE: Running this test suite WILL send emails. Please specify an email which can receive emails. The emails can all be ignored once received.

To run the tests you will need to create a json configuration with some user-specific values. This file will be ua_email_client/tests/email_creds.json. It will be populated with:

{
    "email": "...",
    "default_recipient": "...",
    "secondary_recipient": "..."
}

Where "email" is the sending email, "default_recipient" is the main email you want to receive emails, and "secondary_recipient" is a second email to test sending emails to multiple recipients at once.

Once this file is created, just run:

cd ua_email_client/tests
nosetests test_ua_email_client.py

Credits

RyanJohannesBland EtienneThompson

License

MIT

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

ua_email_client-0.1.7.tar.gz (3.7 kB view hashes)

Uploaded source

Built Distribution

ua_email_client-0.1.7-py3-none-any.whl (4.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page