PHPackages                             gclinux/smtper - 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. gclinux/smtper

ActiveLibrary

gclinux/smtper
==============

A simple SMTP Email senter class with PHP.

1.01(8y ago)6231↓100%9MITPHPPHP &gt;=5.3.0

Since Nov 9Pushed 8y ago1 watchersCompare

[ Source](https://github.com/gclinux/smtper)[ Packagist](https://packagist.org/packages/gclinux/smtper)[ RSS](/packages/gclinux-smtper/feed)WikiDiscussions master Synced 2mo ago

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

intuition
---------

[](#intuition)

This is a very simple class of PHP mail sending Supports UTF-8 , supports sending attachments.

一个支持附件的php邮件发送类

#### require

[](#require)

it need these ext in php:

需要开启以下PHP扩展:

> sockets,fileinfo , openssl

#### install:

[](#install)

support composer:

本类支持composer直接安装

```
composer require gclinux/smtper
```

#### how to use:

[](#how-to-use)

```
$mail = new gclinux\Smtper();

 $mail->setDebug(true); //do you want to output the debug information.是否输出调试信息

 $mail->setServer("smtp.XXX.COM", "your_acount@XXXXX", "passwd"); //Setting the SMTP server without SSL. 无SSL的SMTP服务器设置

$mail->setServer("XXXXX", "joffe@XXXXX", "XXXXX", 465, true); //Seeting the SMTP server with SSL .SSL的SMTP服务器设置

 $mail->setFrom("XXXXX"); //Email Sender name 发送者

 $mail->setReceiver("XXXXX@local"); //Email reciver 接收者
 $mail->setReceiver("XXXXX2@local"); //Email reciver,multiple calls will add recivers.多次调用会累计添加接受者

 $mail->setCc("XXXX"); //Set CC .抄送
$mail->setBcc("XXXXX"); //Set CC,multiple calls will append.多次调用会添加.

 $mail->addAttachment("XXXX.png"); //Attachment 附件

 $mail->addAttachment("XXXX.csv"); // 添加附件，多个附件，调用多次

 $mail->setMail("title ", "body"); //the titile and body 标题和内容

$mail->send();
```

it can work well without composer,but you need to inlcude "src/Smtp.php"

它也可以不需要composer,但你要手动include src/Smtp.php这个文件:

```
include "src/Smtp.php"

```

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

2953d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d936ead2ff5263eab7482a3ae58a6ba348bb93f7b9add32e4f4a225161ec95f?d=identicon)[gclinux](/maintainers/gclinux)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/gclinux-smtper/health.svg)

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

PHPackages © 2026

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