Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 3/Devise confirmation email server settings

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?

like image 962
webo Avatar asked Dec 14 '10 23:12

webo


2 Answers

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.

like image 118
Braden Becker Avatar answered Sep 20 '22 21:09

Braden Becker


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

like image 21
Rod Nelson Avatar answered Sep 20 '22 21:09

Rod Nelson