Rails 3: SMTP Settings for Hotmail/Live Hosted Email

[亡魂溺海] 提交于 2019-12-21 12:11:29

问题


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.

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
}

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


回答1:


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' }


来源:https://stackoverflow.com/questions/13810580/rails-3-smtp-settings-for-hotmail-live-hosted-email

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!