Rails 3 / Configure Confirmation Email Server Settings

I have a Rails 3 application and I use Devise to authenticate users. How to specify an SMTP server for the entire development system?

I entered the following in /config/environments/development.rb(for Apache2 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?

+8
ruby-on-rails devise actionmailer
source share
2 answers

Devise uses ActionMailer to send email, so you need to configure it. Take a look at this tutorial for an example of customizing ActionMailer. Also, if you are using GMail, see this question for details on configuring Rails 3 to use GMail.

+13
source share

I just watched episode 206 of the rail and saw the answer there ActionMailer::Base.default_url_options[:host] = 'mydomain.com:8080'

+1
source share

Source: https://habr.com/ru/post/650143/


All Articles