Answers.Body: <p>WP Mail SMTP actually just uses a mail service (in your case, sounds like gmail).</p>
  <p>You can configure CiviCRM to use the same service using SMTP. I did a quick search on WP Mail SMTP and it does not appear to provide an API - which is likely a way to connect CiviCRM to it.</p>
  <p>While this may seem more secure to you for whichever reasons, you want the least complex process map to each activity. In this case sending mail.</p>
  <p>Using CivCRMs mailer your map is:</p>
  <p>User interacts with Civi,
  Civi triggers mail service,
  Mail service interacts with Gmail</p>
  <p>Using WP Mail SMTP, the map becomes:</p>
  <p>User interacts with Civi,
  Civi triggers some link to WP Mail SMTP,
  WP Mail SMTP triggers mail service,
  Mail service interacts with Gmail</p>
  <p>Your surface map has an extra vector for attackers to leverage.</p>
  <p>I would recommend against using that, however if you do wish to, I would further recommend contacting some developer groups and try to hire someone to write an extension.</p>
  <p>Within CiviCRM community, there is a partner <a href="https://www.civismtp.com" rel="nofollow noreferrer">CiviSMTP</a> that specializes in email and more than likely, talking to them will get you to the best solution.</p>
  <p>Good luck!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-27T02:57:54.357Z
Answers.Text: I don't disagree overall but I think what the poster left out is that in order to use OAUTH with gmail (i.e. they don't want to turn on Less Secure Apps), they can't use Civi's outbound mail settings directly, whereas if they use WP Mail then it has OAUTH capability to connect to google. In Civi at the current time OAUTH is only available for fetching mail/bounces, not sending mail.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-27T10:44:00.287Z
Answers.Text: In that case, the poster might want to see how interest they could get behind changing that behavior and or hire it out. Current behavior would need changed or extended.
  
  Again, I do not see a published API for WP Mail SMTP, so more than likely changing Civi is the easiest way forward.
Answers.UserDisplayName: Karl Tatgenhorst
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-31T02:19:59.900Z
Answers.Text: ty for your answers. I did mean to imply using some OAuth way to use with gmail email, i'll make a edit to my question to clarify that.
  
  with less secure apps needing to be enabled, i will be exploring other solutions for email providers.
Answers.UserDisplayName: Savion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-03-23T06:01:09.803Z
Answers.Text: @Demerit : it's been a time, but after reading your comment above from August 2021
  "_In Civi at the current time OAUTH is only available for fetching mail/bounces, not sending mail_", 
  
  I have raised just raised this [new question](https://civicrm.stackexchange.com/questions/47739/send-email-through-google-workspace-with-oauth)
  
  If by chance you can have a quick look, I'm sure you'll be of great help :)
Answers.UserDisplayName: stackexchange user
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-26T21:12:31.540Z
Answers.LastActivityDate: 2021-08-26T21:12:31.540Z
Answers.UserDisplayName: Karl Tatgenhorst
Body: <p>I'm looking to send mail using the WP Mail SMTP plugin through Google's services because:</p>
  <ul>
  <li>I get better limits</li>
  <li>I don't have to enable less secure apps.</li>
  </ul>
  <p>Is there a way to make these work together? Or another suggested SMTP mail provider?</p>
  <p>WP Mail SMTP is nice because I can OAuth sign-in with my google provider giving me those better limits.</p>
  
Tags: <wordpress><civimail>
Title: Is there a way to have CiviCRM send & receive mail using the WP Mail SMTP plugin?
ThreadText: # Is there a way to have CiviCRM send & receive mail using the WP Mail SMTP plugin?
  
  (Asked by: username_0 on 2021-08-26)
  
  I'm looking to send mail using the WP Mail SMTP plugin through Google's services because:
  
  * I get better limits
  * I don't have to enable less secure apps.
  
  Is there a way to make these work together? Or another suggested SMTP mail provider?
  
  WP Mail SMTP is nice because I can OAuth sign-in with my google provider giving me those better limits.
  
  **Tags:** wordpress, civimail
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-08-26. Score: 1 | Accepted answer
  
  WP Mail SMTP actually just uses a mail service (in your case, sounds like gmail).
  
  You can configure CiviCRM to use the same service using SMTP. I did a quick search on WP Mail SMTP and it does not appear to provide an API - which is likely a way to connect CiviCRM to it.
  
  While this may seem more secure to you for whichever reasons, you want the least complex process map to each activity. In this case sending mail.
  
  Using CivCRMs mailer your map is:
  
  User interacts with Civi,
  Civi triggers mail service,
  Mail service interacts with Gmail
  
  Using WP Mail SMTP, the map becomes:
  
  User interacts with Civi,
  Civi triggers some link to WP Mail SMTP,
  WP Mail SMTP triggers mail service,
  Mail service interacts with Gmail
  
  Your surface map has an extra vector for attackers to leverage.
  
  I would recommend against using that, however if you do wish to, I would further recommend contacting some developer groups and try to hire someone to write an extension.
  
  Within CiviCRM community, there is a partner [CiviSMTP](https://www.civismtp.com) that specializes in email and more than likely, talking to them will get you to the best solution.
  
  Good luck!
  
  > **Comments:**
  > **username_2**: I don't disagree overall but I think what the poster left out is that in order to use OAUTH with gmail (i.e. they don't want to turn on Less Secure Apps), they can't use Civi's outbound mail settings directly, whereas if they use WP Mail then it has OAUTH capability to connect to google. In Civi at the current time OAUTH is only available for fetching mail/bounces, not sending mail.  
  > **username_1**: In that case, the poster might want to see how interest they could get behind changing that behavior and or hire it out. Current behavior would need changed or extended.  Again, I do not see a published API for WP Mail SMTP, so more than likely changing Civi is the easiest way forward.  
  > **username_0**: ty for your answers. I did mean to imply using some OAuth way to use with gmail email, i'll make a edit to my question to clarify that.  with less secure apps needing to be enabled, i will be exploring other solutions for email providers.  
  > **username_3**: @username_2 : it's been a time, but after reading your comment above from August 2021 "_In Civi at the current time OAUTH is only available for fetching mail/bounces, not sending mail_",   I have raised just raised this [new question](https://civicrm.username_3.com/questions/47739/send-email-through-google-workspace-with-oauth)  If by chance you can have a quick look, I'm sure you'll be of great help :)  
  
  ---
  
  