https://github.com/cosmo/azure_communication_email
https://github.com/cosmo/azure_communication_email
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cosmo/azure_communication_email
- Owner: Cosmo
- License: mit
- Created: 2025-09-07T23:16:31.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-09-08T09:13:36.000Z (10 months ago)
- Last Synced: 2025-11-09T10:18:50.388Z (8 months ago)
- Language: Ruby
- Size: 22.5 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Azure Communication Email
Azure Communication Email is an Action Mailer delivery method for Ruby on Rails using the [Azure Email Communications Service](https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/email/create-email-communication-resource?pivots=platform-azp).
## Installation
Install the gem and add to your application's Gemfile by executing:
```bash
bundle add azure_communication_email
```
Or add it manually to your Gemfile:
```ruby
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.
```ruby
# 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://.communication.azure.com"
access_key: ENV.fetch("ACS_EMAIL_ACCESS_KEY"),
}
end
```
Then, you can use Action Mailer as usual:
```ruby
class UserMailer < ApplicationMailer
def welcome_email(user)
@user = user
mail(to: @user.email, from: "donotreply@.com", subject: "Hello World!")
end
end
```
## Links
- [Service limits for Azure Communication Services](https://learn.microsoft.com/en-us/azure/communication-services/concepts/service-limits#email)
- [How to add and remove Multiple Sender Addresses to Email Communication Service](https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/email/add-multiple-senders?pivots=platform-azp)
## Contributing
Bug reports and pull requests are welcome.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).