No commit activity in last 3 years
No release in over 3 years
Mailgun API adapter for Action Mailer
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Mailgun API Action Mailer Adapter

A simple Mailgun API Action Mailer adapter.

The alternatives try to recreate The Matrix, while others just utilize the config.action_mailer.delivery_method = :smtp. Why make a gem for that? Here is what Mailgun says "Send with SMTP or API".

Install

Plop the gem into your Gemfile.

gem 'mailgun-api-rails'

Run the bundle command.

$ bundle

Set the delivery_method to :mailgun in config/application.rb or your environment specific configuration. When it comes to the mailgun_settings, I just map them from my .env file

config.action_mailer.delivery_method = :mailgun

## Settings
config.action_mailer.mailgun_settings = {
  domain:       ENV['MAILGUN_DOMAIN'],
  api_key:      ENV['MAILGUN_API_KEY'],       
  api_base_url: ENV['MAILGUN_API_BASE_URL']   ## api.mailgun.net/v3
}

Boom. Done. Works with devise_mail as well.