Skip to content

Instantly share code, notes, and snippets.

@nlevchuk
Created December 1, 2013 17:48
Show Gist options
  • Save nlevchuk/7738269 to your computer and use it in GitHub Desktop.
Save nlevchuk/7738269 to your computer and use it in GitHub Desktop.
console sending mail
custom = ::Mail.new(raw_email)
key = Rails.application.config.action_mailer.delivery_method
delivery_method = ActionMailer::Base.delivery_methods.fetch(key)
delivery_settings = ActionMailer::Base.send("#{key}_settings")
custom.delivery_method(delivery_method, delivery_settings)
custom.deliver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment