I am trying to get my application to send email using ActionMailer.
I created an email account called admin@mydomain.com with password "mypassword" using cpanel
I have put the following in my my config/environments/production.rb
# Disable delivery errors, bad email addresses will be ignored
config.action_mailer.delivery_method = :smtp
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true
config.action_mailer.default_charset = "utf-8"
config.action_mailer.server_settings = {
:address => "localhost"
:port => 25,
:domain => "mydomainname.com",
:authentication => :login,
:user_name => "admin",
:password => "mypassword"
}
I have probably not set the :address or :domain correctly since I am not exactly sure how to set them up.
The web page comes back with the "sorry but something went wrong" message and my production log file contains the following message:
Net::SMTPAuthenticationError (535 Incorrect authentication data
):
/usr/local/lib/ruby/1.8/net/smtp.rb:586:in `auth_login'
/usr/local/lib/ruby/1.8/net/smtp.rb:571:in `__send__'
/usr/local/lib/ruby/1.8/net/smtp.rb:571:in `authenticate'
/usr/local/lib/ruby/1.8/net/smtp.rb:411:in `do_start'
/usr/local/lib/ruby/1.8/net/smtp.rb:378:in `start'
/usr/local/lib/ruby/1.8/net/smtp.rb:316:in `start'