PHPackages                             xcode75/postal - 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. xcode75/postal

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

xcode75/postal
==============

Postal for PHP library.

v1.0(2y ago)0250MITPHPPHP &gt;=5.4

Since Jul 1Pushed 2y agoCompare

[ Source](https://github.com/xcode75/postal-php)[ Packagist](https://packagist.org/packages/xcode75/postal)[ Docs](https://github.com/xcode75/postal-php)[ RSS](/packages/xcode75-postal/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Postal for PHP
==============

[](#postal-for-php)

This library helps you send e-mails through [Postal](https://github.com/atech/postal) in PHP 5.4 and above.

Installation
------------

[](#installation)

Install the library using [Composer](https://getcomposer.org/):

```
$ composer require postal/postal

```

Usage
-----

[](#usage)

Sending an email is very simple. Just follow the example below. Before you can begin, you'll need to login to our web interface and generate a new API credential.

```
// Create a new Postal client using the server key you generate in the web interface
$client = new Postal\Client('https://postal.yourdomain.com', 'your-api-key');

// Create a new message
$message = new Postal\SendMessage($client);

// Add some recipients
$message->to('john@example.com');
$message->to('mary@example.com');
$message->cc('mike@example.com');
$message->bcc('secret@awesomeapp.com');

// Specify who the message should be from. This must be from a verified domain
// on your mail server.
$message->from('test@test.postal.io');

// Set the subject
$message->subject('Hi there!');

// Set the content for the e-mail
$message->plainBody('Hello world!');
$message->htmlBody('Hello world!');

// Add any custom headers
$message->header('X-PHP-Test', 'value');

// Attach any files
$message->attach('textmessage.txt', 'text/plain', 'Hello world!');

// Send the message and get the result
$result = $message->send();

// Loop through each of the recipients to get the message ID
foreach ($result->recipients() as $email => $message) {
    $email;            // The e-mail address of the recipient
    $message->id();    // Returns the message ID
    $message->token(); // Returns the message's token
}
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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

1049d ago

### Community

Maintainers

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

---

Top Contributors

[![willpower232](https://avatars.githubusercontent.com/u/1619102?v=4)](https://github.com/willpower232 "willpower232 (4 commits)")[![adamcooke](https://avatars.githubusercontent.com/u/4765?v=4)](https://github.com/adamcooke "adamcooke (3 commits)")[![xcode75](https://avatars.githubusercontent.com/u/87862554?v=4)](https://github.com/xcode75 "xcode75 (2 commits)")[![minusmillionaer](https://avatars.githubusercontent.com/u/3305960?v=4)](https://github.com/minusmillionaer "minusmillionaer (1 commits)")[![stedaniels](https://avatars.githubusercontent.com/u/1185722?v=4)](https://github.com/stedaniels "stedaniels (1 commits)")

---

Tags

postalmail

### Embed Badge

![Health badge](/badges/xcode75-postal/health.svg)

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

###  Alternatives

[zbateson/mail-mime-parser

MIME email message parser

53949.2M79](/packages/zbateson-mail-mime-parser)[webklex/php-imap

PHP IMAP client

4365.5M14](/packages/webklex-php-imap)[postal/postal

Postal for PHP library.

81305.4k14](/packages/postal-postal)[zbateson/stream-decorators

PHP psr7 stream decorators for mime message part streams

4748.6M6](/packages/zbateson-stream-decorators)[opcodesio/mail-parser

Parse emails without the mailparse extension

216.8M8](/packages/opcodesio-mail-parser)[scullwm/mailhookbundle

A bundle to catch API webhook from differents mail service

4020.5k](/packages/scullwm-mailhookbundle)

PHPackages © 2026

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