dev-master
9999999-devSendgrid plugin for CakePHP
MIT
The Requires
- php >=5.4.16
- cakephp/cakephp ~3.0
- sendgrid/sendgrid ~4.0
The Development Requires
by Madalin Ignisca
cakephp sendgrid
Sendgrid plugin for CakePHP
details on installation tbd, (*1)
You can install this plugin into your CakePHP application using composer., (*2)
The recommended way to install composer packages is:, (*3)
composer require madalinignisca/sendgrid
Add to config/bootstrap.php above, (*4)
Email::configTransport(Configure::consume('EmailTransport'));
the following line, (*5)
Plugin::load('MadalinIgnisca/Sendgrid', ['bootstrap' => true]);
The plugin loads from dotenv the following:
SENDGRID_USERNAME
SENDGRID_PASSWORD
or
SENGRID_API
, (*6)
Add in your app.php file, in the EmailTransport item, (*7)
'EmailTransport' => [ ... 'sendgrid' => [ 'className' => '\MadalinIgnisca\Sendgrid\Mailer\Transport\SendgridTransport', 'username' => 'your_username_or_api_key', 'password' => 'your_password_or_null_if_api_key, ] ... ],
Make sure if using V4 of Sendgrid, you set the API key as username (will alter code to also support config as 'apikey') for now., (*8)
To use it by default, set your default transport to sendgrid
in the Email config., (*9)
Sendgrid plugin for CakePHP
MIT
cakephp sendgrid