【问题标题】:sendgrid port 2525 not working in Rails appsendgrid 端口 2525 在 Rails 应用程序中不起作用
【发布时间】:2015-05-14 16:38:53
【问题描述】:

我正在尝试在 Rails 应用程序中使用针对 SendGrid 的 Google Cloud 优惠。在我的 config/environment/production.rb 中,我有:

config.action_mailer.delivery_method = :smtp


# SMTP Settings for use with SendGrid
ActionMailer::Base.smtp_settings = 
 {
 :user_name => "myusername", 
 :password => "mypassword",
 :domain => "mydomain",
 :address => "smtp.sendgrid.net",
 :port => 2525,
 :authentication => :plain,
 :enable_starttls_auto => true
}

它立即连接,我立即收到错误:

Net::SMTPAuthenticationError (535 Authentication failed: Bad username / password

我可以在网络上使用相同的凭据登录,没问题。有人知道为什么会这样吗?

【问题讨论】:

  • Sendgrid 通常需要端口 587。您为什么使用 2525?
  • 因为谷歌云只允许2525

标签: ruby-on-rails google-app-engine sendgrid


【解决方案1】:

这原来是一个 rvm 问题。卸载并重新安装 rvm 解决了这个问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-19
    • 2018-06-09
    • 2014-01-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多