550 Cannot get to the specified address

I followed all the instructions for heroku and sendgrid, but users get an error message when trying to register. I started the logs and here is the error. What is wrong here?

2013-07-01 app[web.1]: Net::SMTPFatalError (550 Cannot receive from specified address < jay.mancho1@gmail.com >: Unauthenticated senders not allowed 

my settings;

configurations / Initializers / devise.rb

  config.mailer_sender = " jay.mancho1@gmail.com " 

configurations / environment / production.rb

 config.action_mailer.default_url_options = { :host => '***.herokuapp.com' } ActionMailer::Base.smtp_settings = { :address => "smtp.sendgrid.net", :port => "25", :authentication => :plain, :user_name => ENV['***@heroku.com'], :password => ENV['***'], :domain => ENV['heroku.com'] } 
+6
source share
1 answer

You need to change the line where you specify the username and password ENV['SENDGRID_USERNAME'] and ENV['SENDGRID_PASSWORD'] , and not your actual password. These values ​​are stored on the server and should not be displayed in your code.

+9
source

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


All Articles