class Twelvefactor::Environment::Mailer::Sendmail

Public Class Methods

apply(app, mailer_url) click to toggle source
# File lib/twelvefactor/environment/mailer/sendmail.rb, line 5
def self.apply app, mailer_url
  config = app.config
  config.action_mailer.delivery_method = :sendmail
  config.action_mailer.sendmail_settings = sendmail_settings mailer_url
end
sendmail_settings(url) click to toggle source
# File lib/twelvefactor/environment/mailer/sendmail.rb, line 11
def self.sendmail_settings url
  {
    location: url.path,
    arguments: url.query && URI.decode(url.query)
  }.compact
end