实时托管电子邮件的SMTP设置

实时托管电子邮件的SMTP设置

本文介绍了Rails 3:Hotmail /实时托管电子邮件的SMTP设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在正确设置Web应用程序以使用Windows Live Hosted电子邮件而不是普通的Google Apps电子邮件时遇到问题。这是由于Google停止对此类服务收费。

I'm having an issue properly setting up my web application to use Windows Live Hosted email instead of the normal Google Apps Email. This is due to the fact that Google is down charging for such services.

我已经输入了正确的config.action_mailer.smtp_settings,但出于某些原因,我可以无法获得正确发送的电子邮件通知。在下面的我的配置中,如果我将其与其他Google Apps配置设置电子邮件交换,则该功能正常。我错过了什么吗?

I've entered in the proper config.action_mailer.smtp_settings, but for some reason I can't get email notifications to properly send. My config below, if I swap the config with another Google Apps config settings email, it's functional. 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
}

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

This is the error I am receiving.getaddrinfo: nodename nor servname provided, or not known

推荐答案

这是我的配置:

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.

还要记住这一行

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

这篇关于Rails 3:Hotmail /实时托管电子邮件的SMTP设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-01 23:06