PHPackages                             axguowen/think-sesclient - 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. axguowen/think-sesclient

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

axguowen/think-sesclient
========================

Simple Email Service Client For ThinkPHP

04PHP

Since Jan 9Pushed 4mo agoCompare

[ Source](https://github.com/axguowen/think-sesclient)[ Packagist](https://packagist.org/packages/axguowen/think-sesclient)[ RSS](/packages/axguowen-think-sesclient/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

ThinkPHP 邮件推送服务 客户端
===================

[](#thinkphp-邮件推送服务-客户端)

一个简单的 ThinkPHP 邮件推送服务 客户端

主要功能：

支持多平台邮件推送配置：目前支持腾讯云平台；

可扩展自定义平台驱动；

支持facade门面方式调用；

支持动态指定模板；

支持动态切换平台；

安装
--

[](#安装)

```
composer require axguowen/think-sesclient

```

用法示例
----

[](#用法示例)

本扩展不能单独使用，依赖ThinkPHP6.0+

首先配置config目录下的sesclient.php配置文件，然后可以按照下面的用法使用。

简单使用

```
use think\facade\SesClient;

// 发送固定内容的模板邮件
SesClient::send('test@receiver.com');
// 发送带参数的模板邮件
SesClient::send('test@receiver.com', ['code' => '486936']);

// 同时发送多个手机号
SesClient::send('test01@receiver.com,test02@receiver.com');
// 支持数组
SesClient::send(['test01@receiver.com', 'test02@receiver.com'], ['code' => '486936']);
```

动态切换平台

```
use think\facade\SesClient;

// 使用腾讯云邮件推送平台
SesClient::platform('tencent')->send('test@receiver.com', ['code' => '486936']);

// 动态指定模板
SesClient::platform('tencent', ['template_id' => '新的模板ID'])->send('test@receiver.com', ['code' => '486936']);
```

配置说明
----

[](#配置说明)

```
// 邮件推送配置
return [
    // 默认邮件推送平台
    'default' => 'tencent',
    // 邮件推送平台配置
    'platforms' => [
        // 腾讯云
        'tencent' => [
            // 驱动类型
            'type' => 'TencentCloud',
            // 公钥
            'secret_id' => '',
            // 私钥
            'secret_key' => '',
            // 发送邮件的邮箱号
            'from_email' => '',
            // 接收回复的邮箱号
            'reply_to' => '',
            // 模板ID
            'template_id' => '',
            // 服务接入点, 支持的地域列表参考 https://cloud.tencent.com/document/api/382/52071#.E5.9C.B0.E5.9F.9F.E5.88.97.E8.A1.A8
            'endpoint' => '',
        ],
    ],
];
```

自定义平台驱动
-------

[](#自定义平台驱动)

如果需要扩展自定义邮件推送平台驱动，需要实现think\\sesclient\\PlatformInterface接口

具体代码可以参考现有的平台驱动

扩展自定义驱动后，只需要在邮件推送客户端配置文件sesclient.php中设置default的值为该驱动类名（包含命名空间）即可。

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance55

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

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/5bb2b3388238042a25cf42dc44e5ff84adc241510354abae9e91573556753205?d=identicon)[axguowen](/maintainers/axguowen)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/axguowen-think-sesclient/health.svg)

```
[![Health](https://phpackages.com/badges/axguowen-think-sesclient/health.svg)](https://phpackages.com/packages/axguowen-think-sesclient)
```

###  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.3M228](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M52](/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)
