Created
March 20, 2013 14:53
-
-
Save vparihar01/5205286 to your computer and use it in GitHub Desktop.
Devise mailer configuration for registration email sending.
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
#Getting email unscrewed | |
#First configure Devise email in config/initializers/devise.rb: | |
config.mailer_sender = "vivek@yopmail.com" | |
#If you continue to get an error message, did you reboot the server? | |
#Localhost email testing | |
#Do this in the shell you’re using to run the Rails server: | |
#$ export GMAIL_SMTP_USER=username@gmail.com | |
#$ export GMAIL_SMTP_PASSWORD=yourpassword | |
#Add the following to config/environments/development.rb: | |
config.action_mailer.default_url_options = { :host => 'localhost:3000' } | |
config.action_mailer.delivery_method = :smtp | |
config.action_mailer.perform_deliveries = true | |
config.action_mailer.raise_delivery_errors = true | |
config.action_mailer.default :charset => "utf-8" | |
ActionMailer::Base.smtp_settings = { | |
:address => "smtp.gmail.com", | |
:port => 587, | |
:authentication => :plain, | |
:domain => ENV['GMAIL_SMTP_USER'], | |
:user_name => ENV['GMAIL_SMTP_USER'], | |
:password => ENV['GMAIL_SMTP_PASSWORD'], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment