switon/mail 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

switon/mail

最新稳定版本:v1.0.0

Composer 安装命令:

composer require switon/mail

包简介

Mail message composition and SMTP delivery for Switon (standalone)

README 文档

README

Mail message composition and SMTP delivery for Switon Framework.

Installation

composer require switon/mail

Requirements: PHP 8.3+, ext-curl

Quick Start

use Switon\Core\Attribute\Autowired;
use Switon\Mail\Address;
use Switon\Mail\MailerInterface;
use Switon\Mail\Message;

class NotifyService
{
    #[Autowired] protected MailerInterface $mailer;

    public function ping(string $to): void
    {
        $msg = Message::compose()
            ->from(new Address('app@example.com'))
            ->to(new Address($to))
            ->subject('Ping')
            ->text('Hello.');

        $this->mailer->send($msg->get());
    }
}

Docs: https://docs.switon.dev/latest/mail

License

MIT.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 8
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固