SMTP Settings Using Godaddy Mail with Rails 3

How to configure my SMTP settings in an initialization file using Godaddy mail?

+5
source share
2 answers

Shamelessly taken from the article here: http://pilotoutlook.wordpress.com/2008/10/13/setup-email-in-ruby-on-rails-using-godaddysmtp/

Open the ROOT/config/environment.rbfile For sendmail, add the following lines -

ActionMailer::Base.delivery_method = :sendmail
ActionMailer::Base.smtp_settings = {
:domain  => ‘www.example.com’
}

For Godaddy add the following lines -

ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => ‘smtpout.secureserver.net’,
:domain  => ‘www.example.com’,
:port      => 80,
:user_name => ‘johndoe@example.com’,
:password => ‘yourpassword’,
:authentication => :plain
}

Save and restart the web server. Everything is set up for you.

, 300 Godaddy, , , sendmail - .

, 25 - . GoDaddy , 25.

+11
# config/environments/production.rb
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  :address => 'smtpout.secureserver.net',
  :domain  => 'www.example.com',
  :port      => 80,
  :user_name => 'johndoe@example.com',
  :password => 'yourpassword',
  :authentication => :plain
}
+5

All Articles