Yii2 Mailin
, (*1)
SendinBlue Mailin wrapper for Yii2 framework., (*2)
Installation
Preferred way to install is through composer, (*3)
$ composer require naffiq/yii2-mailin
Configuration
Get your API key from SendinBlue account page
and insert it into your config file as follows:, (*4)
[
// ...
'mailin' => [
'class' => 'naffiq\mailin\Mailin',
'apiKey' => SENDINBLUE_API_KEY,
// 'apiUrl' => ''
]
]
]
?>
Usage
To get official SendinBlue library
Mailin object instance, use getClient() method of component, (*5)
mailin->getClient();
// Use $mailin object
?>
Refer to API DOCS (PHP section) for further usage., (*6)
Testing
Before running tests with PHPUnit, supply your SendInBlue API key via environmental variable,
such as this:, (*7)
$ MAILIN_API_KEY=your_key phpunit