Search code examples
ruby-on-railsemailherokusmtpgmail

Which heroku email add-ons support gmail?


I am trying to send emails from my app. I have tried sendgrid before but for some reason it was not sending email for gmail. Here is my configuration.

config.app_domain = 'unstarv.herokuapp.com'

# Email
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.default_url_options = { host: config.app_domain }
config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com', 
port: '587',
enable_starttls_auto: true,
user_name: 'someuser',
password: 'somepass',
authentication: :plain,
domain: 'unstarv.herokuapp.com'

}

Is it enough configuration to send gmail emails for heroku?


Solution

  • Any smtp client that supports their authorization scheme should in theory allow you to send mail through gmail. In terms of Heroku addons you don't really need anything beyond the standard rails ActionMailer class. Using the standard mailer will also keep your code more portable should you choose to run it somewhere besides Heroku.