PHPackages                             yzh52521/phpmailer - 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. yzh52521/phpmailer

ActiveLibrary

yzh52521/phpmailer
==================

扩展类库，基于PHPMailer的邮件发送。

114PHP

Since Jun 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/yzh52521/phpmailer)[ Packagist](https://packagist.org/packages/yzh52521/phpmailer)[ RSS](/packages/yzh52521-phpmailer/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

PHPMailer
=========

[](#phpmailer)

thinkphp6 mail扩展类库，基于PHPMailer的邮件发送。

安装和配置
-----

[](#安装和配置)

修改项目下的composer.json文件，并添加：

```
    "yzh52521/phpmailer":"dev-main"

```

然后执行`composer update`

安装成功后，添加以下配置到./config/phpmailer.php文件：

```
    'mailer' => array(
        'default' => array(
            'host'        => 'smtp.qq.com',
            'username'    => '',
            'password'    => '',
            'charset'     => 'UTF-8', //编码格式
            'smtp_auth'   => true,  //开启SMTP验证
            'is_html'     => true,
            'smtp_secure' => 'ssl',  // 开启TLS 可选
            'port'        => 465, //端口
            'debug'       => 0, //调式模式
        ),
    ),
```

使用
--

[](#使用)

如下代码示例：

```
  $mail = \yzh52521\PHPMailer\Mailer::create()
      ->setSender('xxxxx@qq.com','发送者')//发送人
      ->setManyCC(['jjj@163.com'])//抄送
      ->setContent('我是标题','我是内容')
      ->send();
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

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/052aa4acd90ad5d672ae5abe8d27d1f576f9c07e1967e2f6bced03b84079310f?d=identicon)[yuanzhihai](/maintainers/yuanzhihai)

---

Top Contributors

[![yuanzhihai](https://avatars.githubusercontent.com/u/15060466?v=4)](https://github.com/yuanzhihai "yuanzhihai (16 commits)")

### Embed Badge

![Health badge](/badges/yzh52521-phpmailer/health.svg)

```
[![Health](https://phpackages.com/badges/yzh52521-phpmailer/health.svg)](https://phpackages.com/packages/yzh52521-phpmailer)
```

PHPackages © 2026

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