Last active
January 4, 2016 20:49
-
-
Save chhhris/39d6dbae3f1f284ee1c6 to your computer and use it in GitHub Desktop.
Sending live emails in development mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# now with Mandrill | |
# with SENDGRID | |
# sending emails to your email while in development mode. | |
# mail_interceptor.rb | |
if Rails.env.development? | |
message.to = '[email protected]' | |
end | |
# sendgrid.rb | |
if Rails.env.development? | |
ActionMailer::Base.delivery_method = :sendmail | |
end | |
ActionMailer::Base.register_interceptor(MailInterceptor) if Rails.env.development? || Rails.env.staging? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment