Answers.Body: <p>I found that I needed to <strong>set up a new user account in our Google organisation</strong> and use that in CiviCRM. Now it works. Here are the steps I did:</p>
  <p><em>Note: English settings might be named a little different than given here; our CiviCRM is set to German so I translate onthe fly.</em></p>
  <ol>
  <li>create new user account in our Google organisation.</li>
  <li>Gmail settings &gt; Forwarding and POP/IMAP &gt; turn on POP access. (Mark Gmail's copy as read.)</li>
  <li>Google account settings &gt; security &gt; turn on &quot;less secure app access&quot;.</li>
  <li>CiviCRM &gt; Admin &gt; CiviMail &gt; Sender address &gt; enter email address of Gmail account.</li>
  <li>CiviCRM &gt; Admin &gt; CiviMail &gt; Mail accounts &gt; edit default account:
  <ol>
  <li>name = Gmail</li>
  <li>server = pop.gmail.com</li>
  <li>username = email address of Gmail account</li>
  <li>password = password of Gmail account (just the regular password, not some app-specific one, because we chose to use &quot;less secure app access&quot;.)</li>
  <li>local part = leave empty</li>
  <li>email domain = the part after @ in the email address of Gmail account</li>
  <li>return path = leave empty</li>
  <li>protocol = POP3</li>
  <li>mail folder = leave empty</li>
  <li>use SSL = turn checkbox on</li>
  <li>use for = bounce</li>
  </ol>
  </li>
  </ol>
  <p>With these settings, the button &quot;save and send test mail&quot; resulted in a successful alert in CiviCRM, and the email was indeed sent to the test recipient.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-14T11:43:51.577Z
Answers.Text: about turn on "less secure app access, what will happen in [January 2025 when google will not allow access with basic authentication](https://support.google.com/a/answer/14114704?hl=en)?
Answers.UserDisplayName: masetto
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-15T12:29:30.687Z
Answers.Text: @masetto I don't know - probably we will switch to a different SMTP provider, e.g. the one I have with DreamHost.com, or worst case, use hoptoad.com (see [this video](https://youtu.be/mrGfahzt-4Q?si=eNSE3WsfZHLmt5_B&t=2348)).
Answers.UserDisplayName: Torben Gundtofte-Bruun
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-29T10:28:20.923Z
Answers.LastActivityDate: 2023-11-29T10:38:43.647Z
Answers.LastEditDate: 2023-11-29T10:38:43.647Z
Answers.UserDisplayName: Torben Gundtofte-Bruun
Answers.Body: <p>You may want to check email permissions in your organization Google Workspace for the email account you switch to and see the &quot;From Email Address Options&quot; CiviCRM page (&quot;Administer &gt; Communications &gt; FROM Email Addresses&quot;)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-28T12:08:25.597Z
Answers.LastActivityDate: 2023-11-28T12:08:25.597Z
Answers.UserDisplayName: yurg
Body: <p>This works:</p>
  <ul>
  <li>I have Civi set up to send email through my personal Google account (using an App Password because I use 2FA). This works, but the emails have <strong>my</strong> address as sender, of course, which we want to fix.</li>
  </ul>
  <p>This does not work:</p>
  <ul>
  <li>My organisation also uses Google, and my account also uses 2FA, and I have also created an App Password - just as with my personal account.</li>
  <li>In CiviCRM, in the SMTP settings, I <em>only</em> replace the SMTP username and SMTP password, switching from my personal data to the organisation data.</li>
  <li>Sending a test email causes <strong>CiviCRM to report &quot;OK&quot;, but that test email never arrives.</strong></li>
  <li>Switching back to my personal account data and sending a new test email is successful: CiviCRM gives the same confirmation <em>and that email arrives.</em></li>
  <li>Despite everything seeming identical, <strong>what am I missing?</strong></li>
  </ul>
  
Tags: <email><smtp><google><outbound-email>
Title: SMTP with Gmail and App Password: Civi says success, but it's not sent
ThreadText: # SMTP with Gmail and App Password: Civi says success, but it's not sent
  
  (Asked by: username_0 on 2023-11-27)
  
  This works:
  
  * I have Civi set up to send email through my personal Google account (using an App Password because I use 2FA). This works, but the emails have **my** address as sender, of course, which we want to fix.
  
  This does not work:
  
  * My organisation also uses Google, and my account also uses 2FA, and I have also created an App Password - just as with my personal account.
  * In CiviCRM, in the SMTP settings, I *only* replace the SMTP username and SMTP password, switching from my personal data to the organisation data.
  * Sending a test email causes **CiviCRM to report "OK", but that test email never arrives.**
  * Switching back to my personal account data and sending a new test email is successful: CiviCRM gives the same confirmation *and that email arrives.*
  * Despite everything seeming identical, **what am I missing?**
  
  **Tags:** email, smtp, google, outbound-email
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2023-11-29. Score: 1 | Accepted answer
  
  I found that I needed to **set up a new user account in our Google organisation** and use that in CiviCRM. Now it works. Here are the steps I did:
  
  *Note: English settings might be named a little different than given here; our CiviCRM is set to German so I translate onthe fly.*
  
  1. create new user account in our Google organisation.
  2. Gmail settings > Forwarding and POP/IMAP > turn on POP access. (Mark Gmail's copy as read.)
  3. Google account settings > security > turn on "less secure app access".
  4. CiviCRM > Admin > CiviMail > Sender address > enter email address of Gmail account.
  5. CiviCRM > Admin > CiviMail > Mail accounts > edit default account:
     1. name = Gmail
     2. server = pop.gmail.com
     3. username = email address of Gmail account
     4. password = password of Gmail account (just the regular password, not some app-specific one, because we chose to use "less secure app access".)
     5. local part = leave empty
     6. email domain = the part after @ in the email address of Gmail account
     7. return path = leave empty
     8. protocol = POP3
     9. mail folder = leave empty
     10. use SSL = turn checkbox on
     11. use for = bounce
  
  With these settings, the button "save and send test mail" resulted in a successful alert in CiviCRM, and the email was indeed sent to the test recipient.
  
  > **Comments:**
  > **username_1**: about turn on "less secure app access, what will happen in [January 2025 when google will not allow access with basic authentication](https://support.google.com/a/answer/14114704?hl=en)?  
  > **username_0**: @username_1 I don't know - probably we will switch to a different SMTP provider, e.g. the one I have with DreamHost.com, or worst case, use hoptoad.com (see [this video](https://youtu.be/mrGfahzt-4Q?si=eNSE3WsfZHLmt5_B&t=2348)).  
  
  ---
  
  ### Answer by username_2 on 2023-11-28. Score: 0
  
  You may want to check email permissions in your organization Google Workspace for the email account you switch to and see the "From Email Address Options" CiviCRM page ("Administer > Communications > FROM Email Addresses")
  
  
  ---
  
  