zf1-future
zf1-future copied to clipboard
Zend_Mail SMTP Oauth2 / XOauth2
Google has stopped providing "Less secure app access" to third party applications. This means that from Zend_Mail we will no longer be able to send emails using gmail.
Does anyone have any idea how to get Zend_Mail working again with Oauth2 or XOauth2?
@icyz i have package help Zend_Mail working again with Oauth2 here https://packagist.org/packages/hungtrinh/zend-mail-oauth2
Thanks @hungtrinh, I will try it as soon as possible. I think it's Oauth2 could be integrated in zf1-future instead use external package :-)
After install: Fatal error: Cannot declare class Zend_Cache, because the name is already in use in /library/Zend/Cache.php on line 28
I will investigate
@icyz oops, look like you integrate hungtrinh/zend-mail-oauth2 with full zend framework 1 (library/Zend existed) => i guess that conflict with requires package zf1s/zend-mail: ^1.14 in this case may be i need move zf1s/zend-mail: ^1.14 into composer suggest
section instead of requires
section
Or you can follow this guide https://github.com/hungtrinh/zend-mail-oauth2#setup-autoload-zend-mail-oauth2-for-zend-framework-1-skeleton-project
Alternatively, you can create a new authorization method for OAuth2 and save it in Zend/Mail/Protocol/Smtp/Auth. Check out this blog post: http://piecewiseinc.blogspot.com/2013/02/send-mail-with-gmail-smtp-and-xoauth.html
Anyone to own this and create PR, pls?
Anyone to own this and create PR, pls?
it's easy to extract code from https://packagist.org/packages/hungtrinh/zend-mail-oauth2 but I think it's better if we keep origin zf1-future functional, try make it back compatible, and forward compatible with php version 8++
@hungtrinh if someone has initiative, I'm not against it :)
@hungtrinh btw, you are right, that we have to be very cautious here, as some changes and new function can potentially override already inherited methods. Therefore I'll make as clear as possible, that some new functionality is comming. Thanks for bringing this into the discussion.