承接 onix-systems-php/hyperf-mailer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-26