Answers.Body: <p>The solution is <a href="https://stackoverflow.com/questions/26736062/sending-email-fails-when-two-factor-authentication-is-on-for-gmail">here</a>.<br/>Generate a sixteen-digit token and use the token instead of your Gmail password. So the SMTP settings will be:<br/><br/>
  SMTP server - smtp.gmail.com<br/>
  SMTP port - 587<br/>
  Authentication - Yes<br/>
  SMTP username - Gmail account username<br/>
  SMTP password - 16-digit token (not your Gmail password)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-17T17:42:16.253Z
Answers.LastActivityDate: 2021-06-17T17:42:16.253Z
Answers.UserDisplayName: Jern
Body: <p>Problem: how to use Gmail SMTP service from CiviCRM (&quot;System Settings -&gt; Outbound Email&quot;) when the Gmail account is set up for two-factor authentication.</p>
  
Tags: <email><smtp>
Title: Sending email from CiviCRM via Gmail SMTP - two-factor authentication
ThreadText: # Sending email from CiviCRM via Gmail SMTP - two-factor authentication
  
  (Asked by: username_0 on 2021-06-17)
  
  Problem: how to use Gmail SMTP service from CiviCRM ("System Settings -> Outbound Email") when the Gmail account is set up for two-factor authentication.
  
  **Tags:** email, smtp
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-06-17. Score: 2 | Accepted answer
  
  The solution is [here](https://stackoverflow.com/questions/26736062/sending-email-fails-when-two-factor-authentication-is-on-for-gmail).  
  Generate a sixteen-digit token and use the token instead of your Gmail password. So the SMTP settings will be:  
    
  SMTP server - smtp.gmail.com  
  SMTP port - 587  
  Authentication - Yes  
  SMTP username - Gmail account username  
  SMTP password - 16-digit token (not your Gmail password)
  
  
  ---
  
  