OAuth2 With SMTP

Hello Everyone,

I am working with laminas/laminas-mail and have IMAP/POP authentication with OAuth2 for Gmail and MS Outlook. The problem I’m running into now is trying to get SMTP authenticating with OAuth2 as well. I could be totally over looking things but I didn’t see a way to configure this with core Laminas code. Is this supported? If so, is there any documentation on the subject or examples available?

Thank you in advance. Cheers.

I just figured it out. I feel like an absolute pepega. :grimacing: I skipped over the comment of “Custom connection classes must be extensions of Laminas\Mail\Protocol\Smtp.” in the Docs. All I needed to do was extend the Smtp protocol and add my own Connection Class of OAuth2.