Page 1 of 1

how to send emails with gmail and oauth2?

Posted: Sun Jun 16, 2024 12:16 am
by lamorte1977

Hi any idea how to use google oauth2 (with json file and auth token) to send emails (for reset passwords, audit) instead of smtp username/password?

Which files do i need to modify?

Thanks


Re: how to send emails with gmail and oauth2?

Posted: Sun Jun 16, 2024 10:28 am
by arbei

There is no such feature in PHPMaker, which uses SMTP only.


Re: how to send emails with gmail and oauth2?

Posted: Mon Jun 17, 2024 2:12 pm
by lamorte1977

thanks for reply, is there a way to implement this manually?


Re: how to send emails with gmail and oauth2?

Posted: Mon Jun 17, 2024 6:14 pm
by arbei

You can

  1. Use Email_Sending server event to send emails in your own way and return false to abort the original email sending, or
  2. Use Custom Files to replace the Email class by your own, or
  3. Make your own extension to replace the Email class by your own.