views:

353

answers:

2

The emails now send from my local, but do not send from my box. I am returned this error. Anyone know what this might be?

Net::SMTPAuthenticationError (535 5.7.8 Error: authentication failed: authentication failure ):

My environments/production.rb

ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
  :address => "smtp.sendgrid.net",
  :port => '25',
  :domain => "mydomain.com",
  :authentication => :plain,
  :user_name => "[email protected]",
  :password => "password1234"
 }

/etc/ssmtp/ssmtp.conf :

root=postmaster
mailhub=smtp.sendgrid.net
[email protected]
AuthPass=password1234
AuthMethod=LOGIN
rewriteDomain=mydomain.com
FromLineOverride=YES
UseSTARTTLS=NO
+3  A: 

This usually happens because your account hasn't been provisioned.

Isaac Saldana
A: 

By the way, I find that it's more favourable to use PostFix with SendGrid so there is less delay for the user when they are using your rails app. When I was using SMTP (like you have above), I was getting long delays when loading an action that sent mail. See this SendGrid wiki page for more info: http://wiki.sendgrid.com/doku.php?id=postfix

ice cream
Thanks Ice CReam :D
Trip