A Python package for sending emails using AWS SES
Project description
Sessender
Sessender is a Python package for sending emails using Amazon SES. It provides a simple interface for sending plain text and HTML emails, as well as attachments.
Installation
You can install Sessender using pip:
pip install sessender
Usage
To use Sessender, you need to provide your Amazon SES credentials as environment variables:
SES_USERNAME
: Your Amazon SES SMTP username.SES_PASS
: Your Amazon SES SMTP password.SES_HOST
: Your Amazon SES SMTP host.SES_PORT
: Your Amazon SES SMTP port.EMAIL_RECIPIENT
: The recipient email address.EMAIL_SENDER
: The sender email address.
Then, create a Sessender
object with your credentials:
To send a plain text email, use the send_email method with the message parameter:
from sessender import SesSender
sender = SesSender()
sender.send_email(
subject='Hello, world!',
message='This is a test email from Sessender.',
)
You can also include attachments with your emails by passing a file path to the attachment parameter:
sender.send_email(
subject='Hello, world!',
message='This is a test email from Sessender with an attachment.',
attachment='/path/to/attachment.txt'
)
To send a html email, use the send_email method with the html_message parameter:
sender.send_email(
subject='Hello, world!',
html_message='<h1>This is a test email from Sessender in HTML format.</h1>',
)
You can also include attachments with your emails by passing a file path to the attachment parameter:
sender.send_email(
subject='Hello, world!',
html_message='This is a test email from Sessender with an attachment.',
attachment='/path/to/attachment.txt'
)
Contributing
If you'd like to contribute to Sessender, please fork the repository and create a pull request. We welcome contributions of all kinds, including bug fixes, new features, and documentation improvements.
License
Sessender is licensed under the MIT License. See LICENSE for more information.
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
Built Distribution
Hashes for sessender-0.4.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e78869682476c4940c7b11b9f4928335c3d4303e867a79eabbf967665c88cc3 |
|
MD5 | 7b162caf4c2a494638dcb9ebd4a26c22 |
|
BLAKE2b-256 | ae42f7b00ef63507577b78beacd930975e104811ac1abc74b1be95e9541bfc39 |