January 27, 2011

Switching Devise Mail Sender Address with the Environment

Filed under: Uncategorized — Tags: , , — yasi8h @ 7:04 am

This is something very simple that i took more than 5 minutes to find out 🙂

in file: config/initializers/devise.rb

if Rails.env.development?
config.mailer_sender = “”
elsif Rails.env.production?
config.mailer_sender = “”

Rails.env does the trick.


1 Comment »

  1. Thanks, works like a charm 🙂

    Comment by plentz — February 16, 2011 @ 12:33 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: