title: mailer authentication error in Rails 3.2 with gmail or SendGrid
body: <p>I'm trying to set up mailing from a very simple Rails 3.2 app. Tried Gmail, tried SendGrid. Getting same error.</p>
  
  <pre><code>Net::SMTPAuthenticationError in UsersController#create
  530-5.5.1 Authentication Required
  </code></pre>
  
  <p>Here's my section of environments/development.rb</p>
  
  <pre><code># Care if the mailer can't send
  config.action_mailer.raise_delivery_errors = true
  
  # Change mail delivery to 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"]
  }
  </code></pre>
  
  <p>Here's my users_controller</p>
  
  <pre><code>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
  </code></pre>
  
  <p>I'm stumped. None of the suggestions I've found online are making a difference.</p>