Skip to content

Instantly share code, notes, and snippets.

@mbleigh
Created October 15, 2012 18:45
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbleigh/3894298 to your computer and use it in GitHub Desktop.
Save mbleigh/3894298 to your computer and use it in GitHub Desktop.
How to use LetterOpener with Pony
require 'pony'
Pony.options = {
:via => :smtp,
:from => "Somebody <notifications@example.com>"
}
if ENV['RACK_ENV'] == 'development'
require "letter_opener"
Pony.options.merge!({
via: LetterOpener::DeliveryMethod,
via_options: {location: File.expand_path('../../tmp/letter_opener', __FILE__)}
})
end
@benjamin-hull
Copy link

Perfect - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment