3

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.

1 Answer 1

1

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 that specializes in email and more than likely, talking to them will get you to the best solution.

Good luck!

3
  • 3
    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.
    – Demerit
    Aug 27, 2021 at 2:57
  • 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. Aug 27, 2021 at 10:44
  • 1
    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.
    – Savion
    Aug 31, 2021 at 2:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.