简体   繁体   English

Rails 3:Hotmail / Live Hosted Email的SMTP设置

[英]Rails 3: SMTP Settings for Hotmail/Live Hosted Email

I'm having an issue properly setting up my web application to use Windows Live Hosted email instead of the normal Google Apps Email. 我在设置我的Web应用程序以使用Windows Live Hosted电子邮件而不是普通的Google Apps电子邮件时遇到问题。 This is due to the fact that Google is down charging for such services. 这是因为谷歌对此类服务收费不足。

I've entered in the proper config.action_mailer.smtp_settings, but for some reason I can't get email notifications to properly send. 我输入了正确的config.action_mailer.smtp_settings,但由于某种原因,我无法收到正确发送的电子邮件通知。 My config below, if I swap the config with another Google Apps config settings email, it's functional. 我的配置如下,如果我将配置与另一个Google Apps配置设置电子邮件交换,它就可以正常运行。 Am I missing something? 我错过了什么吗?

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
}

This is the error I am receiving. 这是我收到的错误。 getaddrinfo: nodename nor servname provided, or not known getaddrinfo:提供nodename或servname,或者不知道

here is my configuration: 这是我的配置:

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  }

The only difference is the authentication. 唯一的区别是身份验证。

Also remember this line 还要记住这一行

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM