Oh, I almost forgot. There are necessary additions needed to send mail from your production environment (heroku in my case).
I used the gem 'sendgrid-ruby'...
You need to add the sendgrid resource on heroku (enable it)
need to add this configuration to the production environment...
config.action_mailer.default_url_options = { :host => 'www.jginfosys.com', :protocol => 'https'
}
and added this to the ... environment.rb
ActionMailer::Base.smtp_settings = {
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:domain => 'www.jginfosys.com',
:address => 'smtp.sendgrid.net',
:port => 587,
:authentication => :plain,
:enable_starttls_auto => true
}
Of course, change your host and domain to match yours.