mirkhamidov / yii2-mail
Handy module for sending and loggin email via core mailer
0.3.2
2021-03-28 18:28 UTC
Requires
- php: >=5.4.0
- mirkhamidov/yii2-alert-autohide: dev-master
- yiisoft/yii2: ^2.0
- yiisoft/yii2-bootstrap: ~2.0.0
- yiisoft/yii2-swiftmailer: ~2.0.0
README
TODO: ADD DESCRIPTION
Installation
The preferred way to install this extension is through composer.
Either run
composer require mirkhamidov/yii2-mail "*"
or add
"mirkhamidov/yii2-mail": "*"
to the require section of your composer.json file.
Usage
Send email with attachment
$_mailRecipient = 'you@email.com'; $_mailMoreData = [ 'someParamInEmail' => 'will be replaced with this text', ]; $_mailParams['attach'] = [ [ 'file' => $model->params['file']['fileFullPath'], 'params' => [ // for details look at http://www.yiiframework.com/doc-2.0/yii-mail-messageinterface.html#attach()-detail ], ], ]; MMail::sendMail($_mailAlias, $_mailRecipient, $_mailMoreData, $_mailParams);