PHPackages                             wscore/mail - 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. wscore/mail

ActiveLibrary

wscore/mail
===========

mail related package

1.0.0(10y ago)126MITPHP

Since Oct 2Pushed 8y ago1 watchersCompare

[ Source](https://github.com/WScore/Mail)[ Packagist](https://packagist.org/packages/wscore/mail)[ RSS](/packages/wscore-mail/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Mail
====

[](#mail)

Wrapper classes for SwiftMailer to simplify some operations.

- Framework agnostic.
- License: MIT License.
- PSR: PSR-1, PSR-2, and PSR-4.

Basic Usage
-----------

[](#basic-usage)

It's as simple as 1, 2, and 3...

```
use WScore\Mail\Transport\Transport;
use WScore\Mail\Mailer;

// 1. create a transport
$transport = Transport::forgeSmtp();

// 2. create a mailer
$mailer = Mailer::newInstance($transport);

// 3. send mails
$mailer->sendText('hello world', function(Swift_Message $message) {
    $message->setTo('test@example.com', 'tested');
});
```

### Message Default

[](#message-default)

You can create a `MessageDefault` object to set a default message in `Mailer`. The methods in `MessageDefault` objects, which start with `with`, are immutable call.

```
// somewhere in a config file.
use WScore\Mail\MessageDefault;
$default = MessageDefault::newInstance()
    ->withFrom('from@example.com', 'from address');
    ->withReturnPath('bad-mail@example.com')
    ->withReplyTo('sender@example.com', 'sender name');

$mailer = Mailer::newInstance($transport)
    ->setMessageDefault($default);

// later on...
$mailer->setMessageDefault(
    $mailer->getMessageDefault()->withBulk() // send bulk mail?
);
$mailer->sendHtml('hi', function(Swift_Message $message) {
    $message->setTo('to@example.com');
});
```

> Or, just use a closure as MessageDefault.

### Japanese ISO-2022

[](#japanese-iso-2022)

sending Japanese in ISO2022 encoding. You must call `Transport::goJapaneseIso2022()` and use `$mailer->sendJIS(...)` method as;

```
Transport::goJapaneseIso2022();
$transport = Transport::forgeSmtp();
$mailer = Mailer::newInstance($transport);
$mailer->sendJIS('some japanese text here',
    function(Swift_Message $message) {
        $message->setTo('test@example.com', 'tested');
});
```

> Use SMTP transport when sending emails in ISO2022 encoding based on my experience...

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

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

3882d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ed783829e6fa0bd4b0def8c04ccfdfb2fc99f9e61e4a9470acad9e5abc5fcac?d=identicon)[asaokamei](/maintainers/asaokamei)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/wscore-mail/health.svg)

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

###  Alternatives

[hellogerard/jobby

Manage all your cron jobs without modifying crontab. Handles locking, logging, error emails, and more.

1.1k1.6M14](/packages/hellogerard-jobby)[yiisoft/yii2-swiftmailer

The SwiftMailer integration for the Yii framework

11520.0M473](/packages/yiisoft-yii2-swiftmailer)[cspoo/swiftmailer-mailgun-bundle

Swiftmailer Mailgun bundle

1031.1M](/packages/cspoo-swiftmailer-mailgun-bundle)[wildbit/swiftmailer-postmark

A Swiftmailer Transport for Postmark.

542.8M6](/packages/wildbit-swiftmailer-postmark)[mailjet/mailjet-swiftmailer

A SwiftMailer transport implementation for Mailjet

261.2M9](/packages/mailjet-mailjet-swiftmailer)[rock-symphony/rock-symphony

Fork of symfony 1.4 with dic, form enhancements, latest swiftmailer and better performance

19164.1k3](/packages/rock-symphony-rock-symphony)

PHPackages © 2026

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