This package is used to provide gmail mail driver for the laravel
milind/laravel-gmail-mail-driver is a Laravel package for this package is used to provide gmail mail driver for the laravel.
It currently has 1 GitHub stars and 7.247 downloads on Packagist (latest version 0.2).
Install it with composer require milind/laravel-gmail-mail-driver.
Discover more Laravel packages by milind
or browse all Laravel packages to compare alternatives.
Last updated
This package is used to provide gmail email service provider for the email driver in laravel.
mailers driver in config/mail.php as below'gmail' =>[
'transport' => 'gmail'
]
gmailmailer service in config/services.php as below'gmailmailer' => [
'AppName' => 'Your-app-name',
'scopes' => [
/* We need both the scopes for the API to send the email */
Google_Service_Gmail::GMAIL_READONLY, // This scope is used to get the user's email address (From which we are sending emails)
Google_Service_Gmail::GMAIL_SEND // This scope is used to send the emails.
],
'authConfig' => [
/*
* We are getting this details from the Google console.
*
*/
"web" => [
"client_id" => env('GOOGLE_EMAIL_SEND_API_CLIENT_ID'),
"client_secret" => env('GOOGLE_EMAIL_SEND_API_CLIENT_SECRET'),
"redirect_uris" => [
env('GOOGLE_EMAIL_SEND_API_REDIRECT')
],
]
],
'tokenType' => 'offline',
'prompt' => 'select_account consent',
]
You need to add it as array
Config::set('services.gmailmailer.accesstoken', $accessToken);
Where $accessToken will be as follows
$accessToken = [
"access_token" => "...",
"expires_in" => ...,
"refresh_token" => "...",
"scope" => "...",
"token_type" => "...",
"created" => ...
];