Skip to main content

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:

  1. Initialize the AzMailer object with the Azure Communication Service connection string and sender's email address:

    mailer = AzMailer(AZURE_CONNECTION_STRING, SENDER_EMAIL_ADDRESS)
    
  2. 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"]
    )
    
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

azmailer-1.0.1-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

Supported by

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