PHPackages                             webguosai/hyperf-mailer - 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. webguosai/hyperf-mailer

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

webguosai/hyperf-mailer
=======================

hyperf邮箱扩展包

0228PHP

Since Apr 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/webguosai/hyperf-mailer)[ Packagist](https://packagist.org/packages/webguosai/hyperf-mailer)[ RSS](/packages/webguosai-hyperf-mailer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

hyperf-mailer
=============

[](#hyperf-mailer)

[![Latest Stable Version](https://camo.githubusercontent.com/d888a80b131d42efa22e87cd3872ede41b4b1d478b88209d41102d518dce3df6/68747470733a2f2f706f7365722e707567782e6f72672f77656267756f7361692f6879706572662d6d61696c65722f762f737461626c65)](https://packagist.org/packages/webguosai/hyperf-mailer)[![Total Downloads](https://camo.githubusercontent.com/53ffa497937801b6daf56e29f3cf7d5921d93e39cf80a75344d3c32c513a79a2/68747470733a2f2f706f7365722e707567782e6f72672f77656267756f7361692f6879706572662d6d61696c65722f646f776e6c6f616473)](https://packagist.org/packages/webguosai/hyperf-mailer)[![Latest Unstable Version](https://camo.githubusercontent.com/1c26e5427efe6096880c118d7a57ae169c7d779a9380d1d862c9b040f254c4a1/68747470733a2f2f706f7365722e707567782e6f72672f77656267756f7361692f6879706572662d6d61696c65722f762f756e737461626c65)](https://packagist.org/packages/webguosai/hyperf-mailer)[![License](https://camo.githubusercontent.com/ebc2e6a39482f30710b7284849552a668138429e34a434f9895117033280a1ff/68747470733a2f2f706f7365722e707567782e6f72672f77656267756f7361692f6879706572662d6d61696c65722f6c6963656e7365)](https://packagist.org/packages/webguosai/hyperf-mailer)

简介
--

[](#简介)

这个库只做`smtp`发送

运行环境
----

[](#运行环境)

- php &gt;= 8.1
- composer
- hyperf &gt;= 3.1

安装
--

[](#安装)

```
composer require webguosai/hyperf-mailer -vvv
```

配置
--

[](#配置)

发布配置

```
php bin/hyperf.php vendor:publish webguosai/hyperf-mailer
```

配置文件

```
use function Hyperf\Support\env;

return [
    'host'     => env('MAIL_HOST', 'smtp.exmail.qq.com'),
    'port'     => env('MAIL_PORT', 465),
    'username' => env('MAIL_USERNAME'),
    'password' => env('MAIL_PASSWORD'),

    'from' => [
        'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
        'name' => env('MAIL_FROM_NAME', 'Example'),
    ],
];
```

使用
--

[](#使用)

### 发送邮件

[](#发送邮件)

```
try {
    mailer()->send(string $toMail, string $subject, string $body, array $attachments, bool $isHtml);
} catch (\PHPMailer\PHPMailer\Exception $e) {
    var_dump($e->getMessage());
}
```

### Facade 发送

[](#facade-发送)

```
use Webguosai\HyperfSms\Facade;

Mailer::send(string $toMail, string $subject, string $body, array $attachments, bool $isHtml);
```

### 文档

[](#文档)

License
-------

[](#license)

MIT

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/79b27387fc59b6ba29854bad71e11e6f7269534da234243353c5ec876bf9af5a?d=identicon)[json.](/maintainers/json.)

---

Top Contributors

[![webguosai](https://avatars.githubusercontent.com/u/2083784?v=4)](https://github.com/webguosai "webguosai (3 commits)")

---

Tags

hyperfhyperf-mailmailmail-client

### Embed Badge

![Health badge](/badges/webguosai-hyperf-mailer/health.svg)

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

###  Alternatives

[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[eduardokum/laravel-mail-auto-embed

Library for embed images in emails automatically

1702.0M5](/packages/eduardokum-laravel-mail-auto-embed)

PHPackages © 2026

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