Skip to content

Instantly share code, notes, and snippets.

@tlehman
Created August 3, 2012 22:34
Show Gist options
  • Select an option

  • Save tlehman/3252204 to your computer and use it in GitHub Desktop.

Select an option

Save tlehman/3252204 to your computer and use it in GitHub Desktop.
ActionMailer method perform_delivery_file
class ActionMailer::Base
def perform_delivery_file(mail)
File.open("#{RAILS_ROOT}/tmp/mails/#{mail.to}.html", 'a') { |f| f.write(mail) }
end
end
config.action_mailer.delivery_method = :file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment