Rails 4 Net::SMTPAuthenticationError: 535 #5.7.0 Authentication failed
Try adding openssl_verify_mode => 'none'
to your action mailer settings:
config.action_mailer.smtp_settings = { :address => "smtp.school.edu", :port => 25, :enable_starttls_auto => true, :user_name => "account@school.edu", :password => "mypassword", :authentication => 'login', :domain => 'http://myapp.herokuapp.com/', :openssl_verify_mode => 'none'}
Granted, we are using Rails 3, but this worked for me. The issue for us was that our certificates are self-signed and the library Rails uses considers that to be a problem.Here is an article that talks about the option.
Should ":domain" point to "school.edu" instead of "herokuapp.com"? I know when you set smtp for gmail via action_mailer settings, you have something like:
config.action_mailer.smtp_settings = { :address => 'smtp.gmail.com', :port => 587, :domain => 'gmail.com', :user_name => 'example@gmail.com', :password => 'example_password', :authentication => 'login', :enable_starttls_auto => true }
Create a file setup_mail.rb
in the folder config/initializers/
and put the code:-
ActionMailer::Base.delivery_method = :smtpActionMailer::Base.perform_deliveries = trueActionMailer::Base.smtp_settings = { :address => "smtp.school.edu", :domain => 'myapp.herokuapp.com', :port => 25, :user_name => "account@school.edu", :password => "mypassword", :authentication => :plain, :enable_starttls_auto => true}ActionMailer::Base.default_url_options[:host] = "myapp.herokuapp.com"