mirakhamidov/yii2-mail

通过核心邮件发送和记录电子邮件的便捷模块

安装: 371

依赖项: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

类型:yii2-extension

0.3.2 2021-03-28 18:28 UTC

This package is auto-updated.

Last update: 2024-08-29 01:46:05 UTC


README

TODO:添加描述

安装

安装此扩展的首选方式是通过 Composer

运行以下命令之一:

composer require mirkhamidov/yii2-mail "*"

或者将以下内容添加到您的 composer.json 文件的 require 部分中:

"mirkhamidov/yii2-mail": "*"

使用方法

发送带附件的电子邮件

$_mailRecipient = 'you@email.com';
$_mailMoreData = [
    'someParamInEmail' => 'will be replaced with this text',
];
$_mailParams['attach'] = [
    [
        'file' => $model->params['file']['fileFullPath'],
        'params' => [
            // for details look at https://yiiframework.cn/doc-2.0/yii-mail-messageinterface.html#attach()-detail
        ],
    ],
];

MMail::sendMail($_mailAlias, $_mailRecipient, $_mailMoreData, $_mailParams);