Net::SMTPAuthenticationError (535 Authentication Failed

1.3k views Asked by At

I'm trying to trigger a mailer in localhost, I can get it to work with gmail but not with my own email hosted in a Linux Cpanel Godaddy server. This is my development.rb configuration:

config.action_mailer.delivery_method = :smtp
  config.action_mailer.smtp_settings = {
  address: 'smtpout.secureserver.net',
  domain: 'mail.[mydomain].com',
  port:25,
  authentication: 'login',
  user_name:'no-reply@[mydomain].mx',
  password:'mypassword',
  enable_starttls_auto: true
}
1

There are 1 answers

4
widjajayd On

the port is 80 not 25, and make sure your firewall not block it

# config/environments/development.rb
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  :address => 'smtpout.secureserver.net',
  :domain  => 'www.example.com',
  :port      => 80,
  :user_name => '[email protected]',
  :password => 'yourpassword',
  :authentication => :plain
}