PHPackages                             lampol/phpmail - 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. lampol/phpmail

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

lampol/phpmail
==============

this is send mail library

1.0(8y ago)61151MITPHP

Since Oct 31Pushed 8y ago2 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

this is send mail by PHP
========================

[](#this-is-send-mail-by-php)

### only support SMTP

[](#only-support-smtp)

#### HOW TO USE

[](#how-to-use)

```
use lampol\Mail;

$config = [
	'emailName'=>'test@qq.com',
	'emailPass'=>'testtest',
	'host'     =>'smtp.163.com'
];

//debug  0 关闭  2开启 默认关闭
//secure  开启加密  ssl  和 tls 两个 默认 tls
//port   端口  默认 25
//emailName  email 地址    必传
//emailPass  email 密码    必传
//host       email 服务器  必传

$mail = new Mail($config,true); //第二个参数是开启异常默认关闭

//$to 收件人邮箱     必选
//$subject 邮件主题  必选
//$content 邮件内容  必选
//$attachPath 附件路径  /tmp/file.p

$res = $mail->sendMail($to,$subject,$content,$attachPath) //第四个参数是发送附件 可以不带此参数

发送成功后返回

$res = {"status":"success","info":"发送成功"}

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

3117d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aadab656e546ae50f5aedb5c195037381e98e51e7c9707295fe1a7a561611a01?d=identicon)[lampol](/maintainers/lampol)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/lampol-phpmail/health.svg)

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

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[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)

PHPackages © 2026

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