项目
在 GitHub 查看
jorgemanrubia/mailgun_rails
关于
Rails Action Mailer adapter for Mailgun
其他项目实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文mailgun_rails
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: '<mailgun api key>',
domain: '<mailgun 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 <[email protected]>', 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
探索相关项目
加载中…