title: Net::SMTPAuthenticationError [Username and Password not accepted]
body: <p>I've got this error on production when app is trying to send a confirmation email. The app is using spree. </p>
  
  <pre><code>    enter code herNet::SMTPAuthenticationError (535-5.7.8 Username and Password not accepted. Learn more at
  
  ):
      `app/controllers/spree/user_registration_controller_decorator.rb:5:in `create`'
      e
  </code></pre>
  
  <p>Here it is a bit of my conf file in production.rb</p>
  
  <pre><code>config.action_mailer.delivery_method = :smtp
    config.action_mailer.default_url_options = { host:'mydomain.com' }
    config.action_mailer.perform_deliveries = true
    config.action_mailer.raise_delivery_errors = true
    config.action_mailer.default :charset =&gt; "utf-8"
    config.action_mailer.smtp_settings = {
     :address =&gt; "smtp.gmail.com",
     :port =&gt; 587,
     :user_name =&gt; 'myemailhere@gmail.com',
     :password =&gt; 'passwordhere',
     :authentication =&gt; :plain,
     :enable_starttls_auto =&gt; true
  </code></pre>
  
  <p>I'm sure about my email and pass. I'd also changed my settings at <a href="http://google.com/settings/security/lesssecureapps" rel="nofollow">http://google.com/settings/security/lesssecureapps</a> and tried sending email after enabling access at <a href="https://accounts.google.com/DisplayUnlockCaptcha.I" rel="nofollow">https://accounts.google.com/DisplayUnlockCaptcha.I</a> don't know what else I can do. Maybe there is something about spree. I'm really unfamiliar with it.</p>