onix-systems-php/hyperf-mailer
最新稳定版本:v1.3.0
Composer 安装命令:
composer require onix-systems-php/hyperf-mailer
包简介
An extension to send email
README 文档
README
Provides hyperf wrapper for the symfony/mailer package.
You can use features like High Availability and Load Balancing.
Includes the following classes:
- Command:
- GenMailCommand;
- Contract:
- HasLocalePreference;
- HasMailAddress;
- ShouldQueue;
- Event:
- MailMessageSending;
- MailMessageSent.
- Service:
- EmailService.
- Mail;
- Mailable.
Install:
composer require onix-systems-php/hyperf-mailer
Publish config:
php bin/hyperf.php vendor:publish onix-systems-php/hyperf-mailer
Code Example:
<?php declare(strict_types=1); namespace App\Mail\Users; use OnixSystemsPHP\HyperfMailer\Contract\ShouldQueue; use OnixSystemsPHP\HyperfMailer\Mailable; class TestEmail extends Mailable implements ShouldQueue { public function __construct(private string $name) { } public function build(): void { $this ->subject('PHP Department welcome') ->textBody(sprintf('Hello, %s!', $this->name)); } } ... $this->emailService->run( new User([ 'email' => $recipient[0], 'first_name' => $recipient[1], ]), new TestEmail($recipient[1]) );
Based on https://github.com/hyperf-ext/mail
统计信息
- 总下载量: 3.66k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-12-26