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

0.3.2 2021-03-28 18:28 UTC

This package is auto-updated.

Last update: 2024-11-29 02:16:33 UTC


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);