Need help with mailgun_rails?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

jorgemanrubia
213 Stars 68 Forks MIT License 125 Commits 18 Opened issues

Description

Rails Action Mailer adapter for Mailgun

Services available

!
?

Need anything else?

Contributors list

# 16,936
Rails
Ruby
HTML
Shell
54 commits
# 105,729
Ruby
Rails
test-co...
capybar...
14 commits
# 73,074
Ruby
tree-st...
Rails
ansible...
4 commits
# 8,827
Python
rfc
resourc...
Heroku
4 commits
# 118,091
Ruby
mongoid
Less
Rails
3 commits
# 325,635
Homebre...
Rails
lockscr...
passcod...
2 commits
# 182,702
Rust
Go
rfc
Shell
1 commit
# 119,120
Python
node
rfc-645...
websock...
1 commit
# 422,893
JavaScr...
messeng...
faceboo...
CSS
1 commit
# 252,435
Rails
GraphQL
HTML
relay
1 commit
# 4,954
Angular
webpack...
webpack...
cljs
1 commit
# 17,406
pcre
reactjs
Redux
Elixir
1 commit
# 322,701
JavaScr...
CSS
slack
slackbo...
1 commit
# 133,197
Ruby
Rails
JavaScr...
Shell
1 commit

mailgun_rails

Build Status

mailgun_rails is an Action Mailer adapter for using Mailgun in Rails apps. It uses the Mailgun HTTP API internally.

Installing

In your

Gemfile
gem 'mailgun_rails'

Usage

To configure your Mailgun credentials place the following code in the corresponding environment file (

development.rb
,
production.rb
...)
config.action_mailer.delivery_method = :mailgun
config.action_mailer.mailgun_settings = {
        api_key: '',
        domain: ''
}

Now you can send emails using plain Action Mailer:

email = mail from: '[email protected]', to: '[email protected]', subject: 'this is an email'
or 
email = mail from: 'Your Name Here ', to: '[email protected]', subject: 'this is an email'

Mailgun variables

email.mailgun_variables = {name_1: :value_1, name_2: value_2}

Recipient Variables (for batch sending)

email.mailgun_recipient_variables = {'[email protected]' => {id: 1}, '[email protected]' => {id: 2}}

Custom MIME headers

email.mailgun_headers = {foo: 'bar'}

Mailgun options

To provide option parameters like

o:campaign
or
o:tag
.
email.mailgun_options = {campaign: '1'}

Pull requests are welcomed

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.