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

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

我输入了正确的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:提供nodename或servname,或者不知道

这是我的配置:

 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 } 

唯一的区别是身份validation。

还要记住这一行

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