Really cleared up my confusion about sending email in both development and production environments.
In this tutorial I will show you how to set up the mailer for the forgot password feature in Devise. In the tutorial I will be setting up a Gmail account and I will show you how its done using local environment variables. I will also be using Heroku and Foreman to set up environment variables.
I am using Rails 4 and Devise 3 for this tutorial.
Seting Up Development Environment
First we will set up the development mailer for use on your local machine. In “config/environments/development.rb” you should already have included
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
when you installed devise.
Next you should turn on the option to raise an exception if there is an error when sending an email. You can do this by including
config.action_mailer.raise_delivery_errors = true
in the same file. Next we will add the email delivery method. You should leave the values as…
View original post 672 more words