Download the PHP package hungtrinh/zend-mail-oauth2 without Composer
On this page you can find all versions of the php package hungtrinh/zend-mail-oauth2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download hungtrinh/zend-mail-oauth2
More information about hungtrinh/zend-mail-oauth2
Files in hungtrinh/zend-mail-oauth2
Download hungtrinh/zend-mail-oauth2
More information about hungtrinh/zend-mail-oauth2
Files in hungtrinh/zend-mail-oauth2
Vendor hungtrinh
Package zend-mail-oauth2
Short Description IMAP, POP3, SMTP work with XOAUTH2 authentication for Zend Mail, Zend Framework 1
License MIT
Package zend-mail-oauth2
Short Description IMAP, POP3, SMTP work with XOAUTH2 authentication for Zend Mail, Zend Framework 1
License MIT
Please rate this library. Is it a good library?
Informations about the package zend-mail-oauth2
zend-mail-oauth2 (Zend Framework 1)
This package help project use zend-mail (zend Framework 1) work with oauth2 authentication (XOAUTH2)
PHP 5.3-8.x compatible
Tested on Gmail, Azure AD:
- Gmail - Authenticate an IMAP, POP or SMTP connection using OAuth
- Azure AD - Authenticate an IMAP, POP or SMTP connection using OAuth
Table of Contents
- Installation
- Usage
- Code examples working with gmail (azure mail)
- Retrieve mail over IMAP
- Retrieve mail over POP3
- Send mail over SMTP
- How to get $oauth2AccessToken
- Setup autoload zend-mail-oauth2 for zend framework 1 skeleton project
Installation
Usage
Code examples working with gmail (azure mail)
- Guide create google web app, azure web app (provide client_id, secret_id) for your webapp to obtain oauth2 access_token, refresh_token.
- Authenticate with oauth2 (xoauth2 protocol): email + access_token
- Retrieve 15 over IMAP
- Retrieve 15 over POP3
- Send email over SMTP
Open browser with url http://localhost:8080.
Retrieve mail over IMAP
Retrieve mail over POP3
Send mail over SMTP
How to get $oauth2AccessToken
Your current web app need add functional to maintain access_token
- public uri handler oauth2 response from google / azure / other web app http://your_app_domainoauth2-callback.php (persist access_token, refresh_token, expire_time to db or other persist storage)
- access_token have short lifetime (1h) so you can (optional)
- setting cron-job run every 50 minute use refresh_token to get new access_token, after that persist access_token, refresh_token, expire_time to db. other process will use access_token to send or retrieve email
- Or in process send/retrieve email use expire_time to verify if access_token is expired then use refresh_token to get new access_token
Full guide please see section Code examples working with gmail (azure mail)
Setup autoload zend-mail-oauth2 for zend framework 1 skeleton project
Add line require_once __DIR__ . '/../vendor/autoload.php';
after init Zend_Application like that, public/index.php
file content
`
All versions of zend-mail-oauth2 with dependencies
PHP Build Version
Package Version
The package hungtrinh/zend-mail-oauth2 contains the following files
Loading the files please wait ....