PHPackages                             lujihong/hyperf-smtp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. lujihong/hyperf-smtp

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

lujihong/hyperf-smtp
====================

hyperf mailer component

1.0.0(5y ago)22.1kApache-2.0PHPPHP &gt;=7.4.0

Since Jan 14Pushed 5y ago1 watchersCompare

[ Source](https://github.com/lujihong/hyperf-smtp)[ Packagist](https://packagist.org/packages/lujihong/hyperf-smtp)[ RSS](/packages/lujihong-hyperf-smtp/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Smtp
====

[](#smtp)

---

介绍
==

[](#介绍)

电子邮件是—种用电子手段提供信息交换的通信方式，是互联网应用最广的服务。电子邮件几乎是每个web应用程序不可或缺的，无论是时事通讯还是订单确认。本库采用swoole协程客户端实现了电子邮件的发送，基于easyswoole/smtp修改增加设置发送者昵称

安装
==

[](#安装)

```
composer require lujihong/hyperf-smtp
```

用法
==

[](#用法)

```
use EasySwoole\Smtp\Mailer;
use EasySwoole\Smtp\MailerConfig;
use EasySwoole\Smtp\Message\Html;
use EasySwoole\Smtp\Message\Attach;
go(function (){

    $config = new MailerConfig();
    $config->setServer('smtp.163.com');
    $config->setSsl(true);
    $config->setUsername('username');
    $config->setPassword('password');
    $config->setMailFrom('mail from');
    $config->setFromNickname('nickname');//发送者昵称
    $config->setTimeout(10);//设置客户端连接超时时间
    $config->setMaxPackage(1024*1024*5);//设置包发送的大小：5M

    //设置文本或者html格式
    $mimeBean = new Html();
    $mimeBean->setSubject('Hello Word!');
    $mimeBean->setBody('Hello Word');

    //添加附件
    $mimeBean->addAttach(Attach::create('filepath'));

    $mailer = new Mailer($config);
    $mailer->sendTo('maile', $mimeBean);
});
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1986d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/857a0c0ff93a510cb3a9e7a41229e4799a3c13c6f982c1a872f29cc4fa481957?d=identicon)[lujihong](/maintainers/lujihong)

---

Top Contributors

[![lujihong](https://avatars.githubusercontent.com/u/31462984?v=4)](https://github.com/lujihong "lujihong (2 commits)")

### Embed Badge

![Health badge](/badges/lujihong-hyperf-smtp/health.svg)

```
[![Health](https://phpackages.com/badges/lujihong-hyperf-smtp/health.svg)](https://phpackages.com/packages/lujihong-hyperf-smtp)
```

###  Alternatives

[mattketmo/email-checker

Throwaway email detection library

2752.1M5](/packages/mattketmo-email-checker)[sarfraznawaz2005/noty

Laravel package to incorporate noty flash notifications into laravel.

324.5k](/packages/sarfraznawaz2005-noty)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
