Configuring Devise with Sendgrid

Modify the devise configuration file

Locate and edit the config/initializers/devise.rb file

config.mailer_sender = "[email protected]"

I typically use an environment variable for this setting

Modify the Production Configuration

Locate and edit config/environments/production.rb

config.action_mailer.default_url_options = { :host => 'your.websitedomain.com' }
ActionMailer::Base.smtp_settings = {
  :user_name            => ENV['SENDGRID_USERNAME'],
  :password             => ENV['SENDGRID_PASSWORD'],
  :address              => "smtp.sendgrid.net",
  :port                 => 587,
  :enable_starttls_auto => true,
  :authentication       => :plain,
  :domain               => "yourdomain.com"
}