【问题标题】:Rails 3: SMTP Settings for Hotmail/Live Hosted EmailRails 3:Hotmail/Live Hosted Email 的 SMTP 设置
【发布时间】:2012-11-28 10:26:06
【问题描述】:

我在正确设置我的网络应用程序以使用 Windows Live 托管电子邮件而不是普通的 Google Apps 电子邮件时遇到问题。这是因为 Google 正在降低此类服务的费用。

我已输入正确的 config.action_mailer.smtp_settings,但由于某种原因,我无法正确发送电子邮件通知。我在下面的配置,如果我将配置与另一封 Google Apps 配置设置电子邮件交换,它就可以正常工作。我错过了什么吗?

config.action_mailer.smtp_settings = {
:enable_starttls_auto => true,
:address              => "smtp.live.com",
:port                 => "587",
:domain               => "mail.live.com",
:user_name            => "###########.net",
:password             => "###########",
:authentication       => :plain
}

这是我收到的错误。 getaddrinfo:提供节点名或服务名,或未知

【问题讨论】:

  • 如果您正在使用设计并尝试发送电子邮件,请确保检查 config/initializers/devise.rb 并更改 config.mailer_sender = 'some.email@live.com'

标签: ruby-on-rails actionmailer


【解决方案1】:

这是我的配置:

config.action_mailer.smtp_settings = {
  :address              => "smtp.live.com",
  :port                 => 587,
  :domain               => 'example.com',
  :user_name            => 'XXXXXXXXX',
  :password             => 'XXXXXXXXX',
  :authentication       => 'plain',
  :enable_starttls_auto => true  }

唯一的区别是身份验证。

还要记住这一行

config.action_mailer.default_url_options = { :host => 'localhost:3000' }

【讨论】:

  • 我收到此错误:SSL 例程:SSL3_GET_RECORD:错误的版本号。你已经看到了吗?任何提示如何解决?
猜你喜欢
  • 2011-05-03
  • 1970-01-01
  • 2012-02-16
  • 1970-01-01
  • 2010-10-02
  • 1970-01-01
  • 2011-09-16
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多