non-rails ActionMailer setup #25

Closed
jjb opened this Issue Jan 3, 2012 · 0 comments

Projects

None yet

2 participants

@jjb
jjb commented Jan 3, 2012

Here's how I got it working with ActionMailer on a non-rails project. Could perhaps go in the Readme.

# Gemfile
gem 'letter_opener', :group => :development

# wherever...
require "letter_opener"

ActionMailer::Base.add_delivery_method :letter_opener, LetterOpener::DeliveryMethod,
  :location => APP_ROOT + "tmp/letter_opener"


ActionMailer::Base.delivery_method = :normal_method
ActionMailer::Base.delivery_method = :letter_opener if ENVIRONMENT == 'development'
@ryanb ryanb closed this in 8a0705c Oct 1, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment