webo
webo

Reputation: 83

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?

Upvotes: 8

Views: 16989

Answers (2)

Rod Nelson
Rod Nelson

Reputation: 3331

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

Upvotes: 1

Braden Becker
Braden Becker

Reputation: 2499

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.

Upvotes: 13

Related Questions