I followed all the instructions on heroku and sendgrid but users receive an error when they try to sign up. I ran 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 <[email protected]>: Unauthenticated senders not allowed
my settings;
config/initializers/devise.rb
config.mailer_sender = "[email protected]"
config/environments/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']
}
550 Blocked error or 550 Requested action not taken: mailbox unavailable is an SMTP (Simple Mail Transfer Protocol) error code. Put simply, this message means that the email you sent was blocked by the recipient's email hosting server, and returned to you.
Envelope blocked – User Entry. A personal block policy is in place for the email address/domain. Remove the email address/domain from the Managed Senders list.
You need to change the line where you are setting the username and password to be ENV['SENDGRID_USERNAME']
and ENV['SENDGRID_PASSWORD']
, not your actual password. These values are stored on the server and should not appear in your code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With