No release in over 3 years
Action Mailer delivery method using the Azure Email Communications Service.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

>= 2.8

Runtime

 Project Readme

Azure Communication Email

Azure Communication Email is an Action Mailer delivery method for Ruby on Rails using the Azure Email Communications Service.

Installation

Install the gem and add to your application's Gemfile by executing:

bundle add azure_communication_email

Or add it manually to your Gemfile:

gem "azure_communication_email"

Usage

To send emails using Azure Communication Services, configure Action Mailer with the :azure_communication_email delivery method and provide the necessary credentials.

# config/environments/production.rb

Rails.application.configure do
  config.action_mailer.delivery_method = :azure_communication_email
  config.action_mailer.azure_communication_email_settings = {
    endpoint:   ENV.fetch("ACS_EMAIL_ENDPOINT"), # e.g., "https://<RESOURCE_NAME>.communication.azure.com"
    access_key: ENV.fetch("ACS_EMAIL_ACCESS_KEY"),
  }
end

Then, you can use Action Mailer as usual:

class UserMailer < ApplicationMailer
  def welcome_email(user)
    @user = user
    mail(to: @user.email, from: "donotreply@<yourdomain>.com", subject: "Hello World!")
  end
end

Links

Contributing

Bug reports and pull requests are welcome.

License

The gem is available as open source under the terms of the MIT License.