No commit activity in last 3 years
No release in over 3 years
HTTP delivery method for ActionMailer
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 4.0.0
 Project Readme

Build Status

HttpActionMailer

AcitonMailer plugin to send HTTP request for debugging mail contents.

Usage

# config/environments/development.rb
config.action_mailer.delivery_method = :http
config.action_mailer.http_settings = {
  url: 'https://example.com',
  path: '/foo/bar',
  headers: {
    'X-HOGEHOGE-Header' => 'XXXX',
  },
}

Example for POST payload

{
    "from": [
        "from@example.com"
    ],
    "to": [
        "to@example.org"
    ],
    "cc": null,
    "subject": "Hello",
    "text": "User#hello\n\nHi, find me in app/views/user_mailer/hello.text.erb\n\n",
    "html": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <style>\n      /* Email styles need to be inline */\n    </style>\n  </head>\n\n  <body>\n    <h1>User#hello</h1>\n\n<p>\n  Hi, find me in app/views/user_mailer/hello.html.erb\n</p>\n\n  </body>\n</html>\n"
}

Installation

Add this line to your application's Gemfile:

gem 'http_action_mailer'

And then execute:

$ bundle

Or install it yourself as:

$ gem install http_action_mailer

Contributing

Contribution directions go here.

License

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