应该如何设置我的SMTP设置在我的初始化文件中使用GoDaddy的邮件?SMTP设置3
SMTP设置3
回答
从这里的文章无耻采取:http://pilotoutlook.wordpress.com/2008/10/13/setup-email-in-ruby-on-rails-using-godaddysmtp/
打开ROOT/config/environment.rb
文件 要使sendmail,加上下面几行 -
ActionMailer::Base.delivery_method = :sendmail
ActionMailer::Base.smtp_settings = {
:domain => ‘www.example.com’
}
对于GoDaddy的,加上下面几行 -
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => ‘smtpout.secureserver.net’,
:domain => ‘www.example.com’,
:port => 80,
:user_name => ‘[email protected]’,
:password => ‘yourpassword’,
:authentication => :plain
}
保存并重启你的网络服务器。你一切都准备好了。
请记住,你只能每天发送300个邮件从GoDaddy的,所以如果你需要发送更多的电子邮件,你将不得不使用sendmail或一些其他的解决方案。
注口未设置为25 - 这是故意的。 GoDaddy的电子邮件服务器被配置为使用多个端口,以防25被阻塞。
注意 - 它应该是ActionMailer :: Base.smtp_settings – ch3rryc0ke 2012-03-22 23:31:54
非常好的一点 - 看起来像server_settings在5年前被弃用并被smtp_settings取代。我的错。 – 2012-03-23 16:40:47
# config/environments/production.rb
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => 'smtpout.secureserver.net',
:domain => 'www.example.com',
:port => 80,
:user_name => '[email protected]',
:password => 'yourpassword',
:authentication => :plain
}
- 1. Rails 3:Google Apps/Heroku的SMTP设置
- 2. 配置smtp设置
- 3. 设置为SMTP
- 4. smtp mail设置
- 5. SMTP设置失败
- 6. hmailserver SMTP DNS设置
- 7. 如何配置SMTP设置
- 8. 如何配置smtp设置?
- 9. 在web.config中设置多个SMTP设置?
- 10. 设置SMTP为PHP邮件
- 11. ASP WebMail:设置SMTP认证?
- 12. 需要帮助设置SMTP
- 13. Dotnetnuke(DNN)SMTP设置失败?
- 14. 在IIS Express上设置SMTP
- 15. 如何设置PHPMailer SMTP
- 16. Zend SMTP默认设置
- 17. Python Django Gmail SMTP设置
- 18. Yandex的smtp设置与ssl
- 19. Rails 3:Hotmail/Live托管电子邮件的SMTP设置
- 20. 如何在web.config中配置smtp设置
- 21. gmail smtp与rails 3
- 22. 如何在环境配置文件外设置ActionMailer SMTP设置
- 23. 设置SMTP邮件服务器。完成安装SMTP。怎么办?
- 24. 设置SMTP邮件()函数的SMTP详细信息
- 25. Symfony2 Amazon SES SMTP邮件设置
- 26. Bonobo Git服务器SMTP设置
- 27. 设置收件人时smtp 451错误
- 28. SMTP设置不工作的Hotmail的
- 29. ASP.Net 3.5密码恢复SMTP设置
- 30. 如何设置POP/SMTP在php.ini
你要求的godaddy的SMTP设置?或者如何在Rails应用中设置它们? – thekindofme 2011-04-29 06:41:52
both ............. – user730569 2011-04-29 06:44:37