PHPackages                             overtrue/laravel-mail-aliyun - 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. overtrue/laravel-mail-aliyun

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

overtrue/laravel-mail-aliyun
============================

Aliyun DrirectMail Transport for Laravel Application.

3.1.0(2y ago)709.1k7[1 PRs](https://github.com/overtrue/laravel-mail-aliyun/pulls)MITPHP

Since Jan 24Pushed 1y ago2 watchersCompare

[ Source](https://github.com/overtrue/laravel-mail-aliyun)[ Packagist](https://packagist.org/packages/overtrue/laravel-mail-aliyun)[ GitHub Sponsors](https://github.com/overtrue)[ RSS](/packages/overtrue-laravel-mail-aliyun/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (12)Used By (0)

Laravel mail aliyun
===================

[](#laravel-mail-aliyun)

📧 [Aliyun DrirectMail](https://help.aliyun.com/product/29412.html) Transport for Laravel Application.

[![Sponsor me](https://github.com/overtrue/overtrue/raw/master/sponsor-me-button-s.svg?raw=true)](https://github.com/sponsors/overtrue)

Installing
----------

[](#installing)

```
$ composer require overtrue/laravel-mail-aliyun -vvv
```

Configuration
-------------

[](#configuration)

> API documention: [https://help.aliyun.com/document\_detail/29435.html](https://help.aliyun.com/document_detail/29435.html)

*config/services.php*

```
    'directmail' => [
        'key' => env('ALIYUN_ACCESS_KEY_ID'),
        'secret' => env('ALIYUN_ACCESS_KEY_SECRET'),
        'region_id' => env('ALIYUN_REGION_ID'),
        'from_address' => env('ALIYUN_FROM_ADDRESS'),
        'from_alias' => env('ALIYUN_FROM_ALIAS'),
    ],
```

AccessKeyID 和 AccessKeySecret 由阿里云官方颁发给用户的 AccessKey 信息（可以通过阿里云控制台[用户信息管理](https://usercenter.console.aliyun.com/?spm=a2c4g.11186623.2.17.12f2461dHSyXbw#/manage/ak)中查看和管理）.

Usage
-----

[](#usage)

Set default mail driver and configuration:

*.env*

```
MAIL_DRIVER=directmail

ALIYUN_ACCESS_KEY_ID=  #AccessKeyID
ALIYUN_ACCESS_KEY_SECRET= #AccessKeySecret
ALIYUN_REGION_ID= #RegionID: cn-hangzhou, ap-southeast-1, ap-southeast-2
ALIYUN_FROM_ADDRESS= #FromAddress
ALIYUN_FROM_ALIAS= #FromAlias
```

*TagName*

```
use Overtrue\LaravelMailAliyun\HasTagName;
class VerifyMail extend Mailable{
    use HasTagName;
    public function build()
    {
        $this->tagName('alreadyDefinedTag');
        return $this->text('mails.verify');
    }
}
```

Please reference the official doc: [Laravel Sending mail](https://laravel.com/docs/5.6/mail#sending-mail)

❤️ Sponsor me
-------------

[](#heart-sponsor-me)

[![Sponsor me](https://github.com/overtrue/overtrue/raw/master/sponsor-me.svg?raw=true)](https://github.com/sponsors/overtrue)

如果你喜欢我的项目并想支持它，[点击这里 ❤️](https://github.com/sponsors/overtrue)

Project supported by JetBrains
------------------------------

[](#project-supported-by-jetbrains)

Many thanks to Jetbrains for kindly providing a license for me to work on this and other open-source projects.

[![](https://camo.githubusercontent.com/3cf726e7cdadba47755b7f7ea4227945a92a2fa48aadf4a2573140ec6501c989/68747470733a2f2f7265736f75726365732e6a6574627261696e732e636f6d2f73746f726167652f70726f64756374732f636f6d70616e792f6272616e642f6c6f676f732f6a625f6265616d2e737667)](https://www.jetbrains.com/?from=https://github.com/overtrue)

PHP 扩展包开发
---------

[](#php-扩展包开发)

> 想知道如何从零开始构建 PHP 扩展包？
>
> 请关注我的实战课程，我会在此课程中分享一些扩展开发经验 —— [《PHP 扩展包实战教程 - 从入门到发布》](https://learnku.com/courses/creating-package)

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 78% 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 ~208 days

Recently: every ~330 days

Total

10

Last Release

791d ago

Major Versions

1.0.3 → 2.0.02020-04-03

2.1.2 → 3.0.02023-02-15

### Community

Maintainers

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

---

Top Contributors

[![overtrue](https://avatars.githubusercontent.com/u/1472352?v=4)](https://github.com/overtrue "overtrue (32 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (5 commits)")[![alphasnow](https://avatars.githubusercontent.com/u/8286647?v=4)](https://github.com/alphasnow "alphasnow (3 commits)")[![summerblue](https://avatars.githubusercontent.com/u/324764?v=4)](https://github.com/summerblue "summerblue (1 commits)")

---

Tags

aliyunaliyun-maildirectmaillaravel-mailmail

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/overtrue-laravel-mail-aliyun/health.svg)

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

###  Alternatives

[spatie/laravel-failed-job-monitor

Get notified when a queued job fails

1.0k2.6M4](/packages/spatie-laravel-failed-job-monitor)[vemcogroup/laravel-sparkpost-driver

SparkPost driver to use with Laravel 6.x|7.x|8.x|9.x|10.x

421.7M1](/packages/vemcogroup-laravel-sparkpost-driver)[spatie/mailcoach

Self-host Mailcoach

4007.0k](/packages/spatie-mailcoach)[guanguans/notify

Push notification SDK(AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

682104.9k7](/packages/guanguans-notify)[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)

PHPackages © 2026

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