pceuropa/yii2-email
最新稳定版本:1.2.2
Composer 安装命令:
composer require pceuropa/yii2-email
包简介
Widget help send email. Have validate input email.
README 文档
README
This extension help send emails. In this version (1.0.1) only text messsage.
Installation
The preferred way to install this extension is through composer.
Either run
composer require pceuropa/yii2-email "*"
or add
"pceuropa/yii2-email": "*"
to the require section of your composer.json file.
Configuration
Yii2 config file:
'components' => [
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@common/mail', // basic Yii2: @app/mail
'useFileTransport' => false,
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.gmail.com',
'username' => 'info@gmail.com',
'password' => 'password',
'port' => '587', // or 465
'encryption' => 'tls', // or ssl
]
],
]
Usage
Once the extension is installed, simply use it in your code by :
use pceuropa\email\Send;
Send::widget([
'from' => 'info@pceuropa.net',
'to' => 'info@destiny.pl',
'subject' => 'subject email',
'textBody' => 'Hello Lorem Ipsum. Bye',
]);
统计信息
- 总下载量: 1.81k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-02-27