mirkhamidov / yii2-mail
Handy module for sending and loggin email via core mailer
Installs: 371
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
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);