That should work. However, I have added the following lines to /environments/productions.rb to get mine working.
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => 'smtp.sendgrid.net',
:port => '587',
:authentication => :plain,
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:domain => 'heroku.com'
}
config.action_mailer.default_url_options = { :host => 'your_domain.com' }
And, make sure to set up your SendGrid add-on correctly for your app on Heroku.
You can check to see if SendGrid is configured properly on Heroku:
$ heroku config
You should see SENDGRID_PASSWORD and SENDGRID_USERNAME.