Problem: how to use Gmail SMTP service from CiviCRM ("System Settings -> Outbound Email") when the Gmail account is set up for two-factor authentication.
1 Answer
The solution is here.
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)