开发者

Rails 3/Devise confirmation email server settings

开发者 https://www.devze.com 2023-01-31 03:43 出处:网络
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 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.


i was just watching episode 206 of the rail cast and seen the answer there ActionMailer::Base.default_url_options[:host] = 'mydomain.com:8080'

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号