哪些 heroku 电子邮件附加组件支持 gmail?

Which heroku email add-ons support gmail?

我正在尝试从我的应用程序发送电子邮件。我之前尝试过 sendgrid 但由于某种原因它没有为 gmail 发送电子邮件。 这是我的配置。

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'

}

为 heroku 发送 gmail 电子邮件的配置是否足够?

理论上,任何支持其授权方案的 smtp 客户端都应该允许您通过 gmail 发送邮件。就 Heroku 插件而言,除了标准的 rails ActionMailer class,你真的不需要任何东西。如果您选择 运行 除了 Heroku 之外的某个地方,使用标准邮件程序还可以使您的代码更便携。

当您说 "support Gmail" 时,您是指向 Gmail 发送电子邮件...还是通过 Gmail 发送? (我假设是前者,因为你说“...不为 gmail 发送电子邮件...”)。

有一个新的Heroku Beta Add-on from Sparkpost.com

有多种 Heroku Email/SMS Add-Ons 可用,但 Sparkpost 是所列产品中最 advanced/flexible 的电子邮件基础设施服务。

@kevinkimball created a SparkPost Ruby Gem on Github.