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)
# No Template
client.send_email(destinations, None, subject, body, use_template=False)
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ua_email_client-0.1.9.tar.gz
.
File metadata
- Download URL: ua_email_client-0.1.9.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.5 Linux/6.2.0-37-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 518336b22334238e8454864489bcdc73bf2e8d9afb431761b1e9089bfcf2a4a6 |
|
MD5 | 53ceab91a7d870bfe51d174c42080ddf |
|
BLAKE2b-256 | beff36687611586ba6fd12f19a60df4653034f5fdd5fab516b1acb67a54758d4 |
File details
Details for the file ua_email_client-0.1.9-py3-none-any.whl
.
File metadata
- Download URL: ua_email_client-0.1.9-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.5 Linux/6.2.0-37-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a324bc56f7d1f9fb95ffb03534d1fa6baeff9648d849cbe42aee6c6e6ef5cc3 |
|
MD5 | 956065f21ad81e397234944dc5d67623 |
|
BLAKE2b-256 | 935fb52a29c971b325773bc1379c2a6930f7b8aad4f00aa8d3b1282b07669078 |