I'm trying to use SendGrid as a Heroku add-on with Heroku's cedar stack and rails 3.1.0. when I attempt to send mail with actionMailer, I get this error:
Net::SMTPFatalError (550 Cannot receive from specified address : Unauthenticated senders not allowed
Sending mail with Pony works, but I'd like to use ActionMailer. Since Pony works, I realize that this might not be a problem with SendGrid, but I'm clueless as to how to start solving it.
any ideas?
Official
Response
-
I've since learned this is likely a different issue; the "unauthenticated senders" error generally means you're not attempting to AUTH LOGIN.
When your code connects to us via SMTP, make sure it's issuing the AUTH LOGIN command, followed by the username in base64, then the password in base64.
-
"Unauthenticated senders not allowed" means your providing either a bad username or password.
The easiest way to resolve this is to reset your password: https://sendgrid.com/user/forgotPassword
Just make sure once you update it with us, you update it everywhere else also.-
patrick November 15, 2011 17:44If I am using a correct password, why am I getting the same error on Heroku?EditDeleteRemove
-
-
-
-
-
I've since learned this is likely a different issue; the "unauthenticated senders" error generally means you're not attempting to AUTH LOGIN.
When your code connects to us via SMTP, make sure it's issuing the AUTH LOGIN command, followed by the username in base64, then the password in base64.-
Ok I found out my issue, I was including the SMTP setup in my environment.rb and didn't need to since I was using the Heroku plugin and it does it for you.
ActionMailer::Base.smtp_settings = {
:address => 'smtp.sendgrid.net',
:port => '587',
:authentication => :plain,
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:domain => 'heroku.com'
}
ActionMailer::Base.delivery_method = :smtp -
-
If you get a user name or password error you can check them from within your project, using heroku config --app
-
-
-
-
-
Loading Profile...



Twitter,
Facebook, or email.

EMPLOYEE
