send mails from az
Project description
AzMailer
Introduction
AzMailer is a Python class designed to facilitate sending emails using Azure Communication Services.
Inspired by the Azure Communication Services documentation here, AzMailer simplifies the process of sending emails by providing an easy-to-use interface for constructing and sending email messages.
Installation
To install azmailer, simply use pip:
pip install azmailer
Usage Example
To use the AzMailer class, follow these steps:
-
Initialize the AzMailer object with the Azure Communication Service connection string and sender's email address:
mailer = AzMailer(AZURE_CONNECTION_STRING, SENDER_EMAIL_ADDRESS)
-
Construct an email message using the
construct_message()
method:email_message = mailer.construct_message( subject="Your Email Subject", content="Your Email Content", to_addresses=["recipient1@example.com", "recipient2@example.com"], attachments=["/path/to/file1", "/path/to/file2"] )
-
Send the email message using the
send_email()
method:mailer.send_email(email_message)
Documentation
The Sphinx-generated documentation for azmailer can be found here.
Contribution
Feel free to contribute by submitting issues here.
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.