ActionMailer delivery method for sending emails through Plunk (https://www.useplunk.com/).
PlunkMail allows Rails applications to use Plunk (https://www.useplunk.com/) as an ActionMailer delivery method:
config.action_mailer.delivery_method = :plunkConfigure Plunk in your config/environments/production.rb:
config.action_mailer.delivery_method = :plunk
config.action_mailer.plunk_settings = {
api_key: ENV["PLUNK_API_KEY"]
}Use ActionMailer normally:
class UserMailer < ApplicationMailer
def welcome(user)
mail(
to: user.email,
subject: "Welcome"
)
end
endSend the email:
UserMailer.welcome(user).deliver_nowHTML emails are supported automatically. If an HTML part exists, it will be sent through Plunk.
Add this line to your application's Gemfile:
gem "plunk_mail"And then execute:
$ bundleOr install it yourself as:
$ gem install plunk_mailContribution directions go here.
The gem is available as open source under the terms of the MIT License.