Rails 3 /设计确认电子邮件服务器设置 [英] Rails 3/Devise confirmation email server settings

查看:94
本文介绍了Rails 3 /设计确认电子邮件服务器设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Rails 3应用程序,我正在使用Devise进行用户身份验证。如何为Devise指定应用程序范围的SMTP服务器?



我已经在/config/environments/development.rb中输入了以下内容(Apache2设置为8080)

  config.action_mailer.default_url_options = {:host => 'mydomain.com:8080'} 

有关如何让外发邮件与Devise和Rails 3?

解决方案

Devise使用ActionMailer发送电子邮件,因此您必须进行配置。有关设置ActionMailer的示例,请查看本教程。另外如果您使用的是GMail,请查看此问题有关设置Rails 3以使用GMail的详细信息。


I have a Rails 3 app and I'm using Devise for user authentication. How do I specify an application-wide SMTP server for Devise to use?

I've entered the following into /config/environments/development.rb (Apache2 is set to 8080)

config.action_mailer.default_url_options = { :host => 'mydomain.com:8080' }

Any ideas on how to get outgoing mail to work with Devise and Rails 3?

解决方案

Devise uses ActionMailer to send emails so you have to configure it. Take a look at this tutorial for an example of setting up ActionMailer. Also if you are using GMail take a look at this question for details on setting up Rails 3 to use GMail.

这篇关于Rails 3 /设计确认电子邮件服务器设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆