smtp - mailer authentication error in Rails 3.2 with gmail or SendGrid -


i'm trying set mailing simple rails 3.2 app. tried gmail, tried sendgrid. getting same error.

net::smtpauthenticationerror in userscontroller#create 530-5.5.1 authentication required 

here's section of environments/development.rb

# care if mailer can't send config.action_mailer.raise_delivery_errors = true  # change mail delivery either :smtp, :sendmail, :file, :test config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = {   address: "smtp.gmail.com",   port: 587,   domain: "signaldesign.net",   authentication: "plain",   enable_starttls_auto: true,   user_name: env["gmailusername"],   password: env["gmailpassword"] } 

here's users_controller

def create   @user = user.new(params[:user])   if @user.save     usermailer.signup_confirmation(@user).deliver     sign_in @user     flash[:success] = "welcome!"     redirect_to @user   else     render 'new'   end end 

i'm stumped. none of suggestions i've found online making difference.

i figured out. resorted deleting things , trying again.

i changed smtp_settings username , password from:

user_name: env["gmailusername"], password: env["gmailpassword"] 

to

user_name: "gmailusername", password: "gmailpassword" 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -