PHPackages                             zzx/mail - 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. zzx/mail

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

zzx/mail
========

dev

v1.0.1(7y ago)012MITPHPPHP &gt;=5.3

Since Feb 19Pushed 7y agoCompare

[ Source](https://github.com/13302516724/mail)[ Packagist](https://packagist.org/packages/zzx/mail)[ RSS](/packages/zzx-mail/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (3)Used By (0)

mail
====

[](#mail)

发送邮件，参考phpmailer/phpmailer
\#使用方法
use Zzx\\mail\\PHPMailer;
use Zzx\\mail\\Exception;
引入vendor类
实例化 $mail = new PHPMailer(true);

```
	try {
    		$mail->CharSet  = 'UTF-8'; //设定邮件编码，默认ISO-8859-1，如果发中文此项必须设置，否则乱码
            //Server settings
            //Enable SMTP debugging
            // 0 = off (for production use)
            // 1 = client messages
            // 2 = client and server messages
            $mail->SMTPDebug = 0;
            $mail->isSMTP();
            $mail->Host = 'smtp.163.com，stmo服务器';
            $mail->SMTPAuth = true;
            $mail->Username = '13302516724@163.com，登录邮箱的账号';
            $mail->Password = '邮箱授权密码，与登录账号的密码不一样';
            $mail->SMTPSecure = 'ssl，使用安全协议';
            $mail->Port = 465;

            //发送者
            $mail->setFrom('13302516724@163.com', 'Mailer');
            //接收者
            $mail->addAddress('1064059707@qq.com', 'Joe User');
            $mail->addAddress('1064059707@qq.com');
            //接收者回复的邮箱
            $mail->addReplyTo('info@example.com', 'Information');
            //抄送邮箱
            $mail->addCC('cc@example.com');
            $mail->addBCC('bcc@example.com');

            //发送文件
//            $mail->addAttachment('/var/tmp/file.tar.gz');
//            $mail->addAttachment('/tmp/image.jpg', 'new.jpg');

            //内容
            $mail->isHTML(true);
            $mail->Subject = '测试主题';
            $mail->Body    = '会乱码吗，会乱码吗';
            //$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
            $mail->send();
            echo 'Message has been sent';
        } catch (Exception $e) {
            echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo;
        }

```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity57

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

Every ~0 days

Total

2

Last Release

2689d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/789c9d6bd7972f10fd8e5d711c7ea02107956162442cbd4de70d1e8f86e79c31?d=identicon)[13302516724](/maintainers/13302516724)

---

Top Contributors

[![13302516724](https://avatars.githubusercontent.com/u/20874636?v=4)](https://github.com/13302516724 "13302516724 (6 commits)")

### Embed Badge

![Health badge](/badges/zzx-mail/health.svg)

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

###  Alternatives

[mattketmo/email-checker

Throwaway email detection library

2742.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)
