ushahidi / gmail-support
Support Gmail as Data Provider
Installs: 3 214
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- ext-json: *
- google/apiclient: ^2.0
- illuminate/mail: ^5.5 || ^6.0 || ^7.0 || ^8.0
- illuminate/support: ^5.5 || ^6.0 || ^7.0 || ^8.0
- league/html-to-markdown: ^4.10
- nesbot/carbon: ^1.3 || ^2.3
- zbateson/mail-mime-parser: ^1.2
Requires (Dev)
- orchestra/testbench: ^3.5 || ^4.0 || ^5.0
- phpunit/phpunit: ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0
README
What is this package for?
This gmail support library is a composer package, that extends the ushahidi platform datasource manager, adding Gmail as a data source. It allows the platform to authenticate a gmail account, giving the access to send and receive messages via Gmail Service API instead of the default POP/IMAP.
Installation
You can install the package via composer:
$ composer require ushahidi/gmail-support
The above command will add the package as a dependency in your current project.
Note: In a Ushahidi platform codebase, the package needs to be manually registered. Add the code below to the boostrap/lumen.php
file
$app->register(Ushahidi\Gmail\GmailServiceProvider::class);
Usage
Update your config/services.php
file by adding your Gmail API credentials.
'gmail' => [ 'client_id' => env('GMAIL_CLIENT_ID'), 'client_secret' => env('GMAIL_CLIENT_SECRET'), 'redirect_uri' => env('GMAIL_REDIRECT_URI','urn:ietf:wg:oauth:2.0:oob'), ]
Update your .env
file by adding your server key.
GMAIL_CLIENT_ID= GMAIL_CLIENT_SECRET= GMAIL_REDIRECT_URI=
Tip: For quick gmail authentication setup run the artisan command
$ php artisan gmail:auth
To make use of this support package for mailing in your laravel app, update your .env
and set your mail driver to gmail
.
MAIL_DRIVER=gmail