PHPackages                             dgwht/email - 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. dgwht/email

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

dgwht/email
===========

SMTP发送邮件

v2.0.12(3y ago)03Apache-2.0PHP

Since Nov 4Pushed 2w agoCompare

[ Source](https://github.com/tcxkb/php-email)[ Packagist](https://packagist.org/packages/dgwht/email)[ RSS](/packages/dgwht-email/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (6)Used By (0)

SMTP邮件发送
========

[](#smtp邮件发送)

> 安装

```
composer require dgwht/email
```

> 邮件发送

```
use dgwht\Email;

// 端口非25时自动采用ssl方式
Email::setConfig([
    "host" => "smtp.exmail.qq.com",
    "port" => "25",
    "user" => "admin@dgwht.com",
    "pass" => "xxxxxxxxx",
    "email" => "admin@dgwht.com",
]);

$ret = Email::send('2393176043@qq.com','标题测试','内容测试');

if($ret === true){
    echo "发送成功";
}else{
    echo "发送失败：[{$ret}]";
}
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance63

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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 ~125 days

Total

5

Last Release

1289d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/36f73a8a6d39a950ea32b50c9422b0c779a6d58dcb23b1b7270bf1daeda97f10?d=identicon)[2393176043](/maintainers/2393176043)

---

Top Contributors

[![tcxkb](https://avatars.githubusercontent.com/u/223394868?v=4)](https://github.com/tcxkb "tcxkb (7 commits)")

---

Tags

emailsmtp

### Embed Badge

![Health badge](/badges/dgwht-email/health.svg)

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

###  Alternatives

[mageplaza/module-smtp

SMTP Extension for Magento 2 helps the owner of store simply install SMTP (Simple Mail Transfer Protocol) server which transmits the messages into codes or numbers

3015.9M8](/packages/mageplaza-module-smtp)[zytzagoo/smtp-validate-email

Perform email address verification via SMTP

452909.9k3](/packages/zytzagoo-smtp-validate-email)[aplus/email

Aplus Framework Email Library

2461.6M3](/packages/aplus-email)[sendgrid/smtpapi

Build SendGrid X-SMTPAPI headers in PHP.

696.5M2](/packages/sendgrid-smtpapi)[mlocati/spf-lib

Parse, build and validate SPF (Sender Policy Framework) DNS records

67867.9k2](/packages/mlocati-spf-lib)[pear/net_smtp

An implementation of the SMTP protocol

263.0M16](/packages/pear-net-smtp)

PHPackages © 2026

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