PHPackages                             slick/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. [Mail &amp; Notifications](/categories/mail)
4. /
5. slick/mail

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

slick/mail
==========

Email plugin provides generalized functionality to compose and send both text and MIME-compliant multipart email messages.

v1.1.0(9y ago)01.4k↓50%MITPHPPHP &gt;=5.5

Since Jan 5Pushed 8y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (10)Versions (8)Used By (0)

Slick Mail
==========

[](#slick-mail)

[![Latest Version](https://camo.githubusercontent.com/c4876521e9562ba9506cde6235516dd7648d713744b7e3ac669b2fd7850bab85/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f736c69636b6672616d65776f726b2f6d61696c2e7376673f7374796c653d666c61742d737175617265)](https://github.com/slickframework/mail/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/56c98e7794148e6bffeded30ae75649672f3c38c1040b2e7cf2c6b614743fc46/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f736c69636b6672616d65776f726b2f6d61696c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/slickframework/mail)[![Coverage Status](https://camo.githubusercontent.com/48068311b71a5ed2a697a31853884057cce58600e8202c3b77739a374153115d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f736c69636b6672616d65776f726b2f6d61696c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/slickframework/mail/code-structure?branch=master)[![Quality Score](https://camo.githubusercontent.com/1fcbc91c45a04d493af484ab22b4d3e3b347b8271c8ffbea557c53121a1941ae/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f736c69636b6672616d65776f726b2f6d61696c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/slickframework/mail?branch=master)[![Total Downloads](https://camo.githubusercontent.com/127a106ecbb3c9785ef493e2070039be4ccc6e03c41196dbac01b766be9120b7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736c69636b2f6d61696c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/slick/mail)

Email plugin provides generalized functionality to compose and send both text and MIME-compliant multi-part e-mail messages.

This package is compliant with PSR-2 code standards and PSR-4 autoload standards. It also applies the semantic version 2.0.0 specification.

**Features**

- Easy mail transport creation (SMTP, PHP mail())
- Uses [Twig](http://twig.sensiolabs.org/) for a robust template engine
- Multi-Part e-mail messages

**Installation**

To use E-Mail plugin in your project just run the following command:

```
$ composer require slick/mail

```

**Quick Start**

Create a message:

```
use Slick\Mail\Message;
use Slick\Mail\MessageBody;

$message = new Message();
$message->setFrom('some@from.address', 'Slick Mail')
    ->addTo('you@example.com')
    ->setSubject('Log message');

$body = new MessageBody(
    'mail/template.twig',
    ['foo' => $foo, 'bar' => 'baz']
);
$message->setBody($body);
```

If you need to send a multi-part e-mail with text and HTML or embedding images in it for example, you can do like this:

```
use Slick\Mail\Mime;
use Slick\Mail\Mime\MimeMessage;
use Slick\Mail\Mime\Part as MimePart;

$text = new MimePart('mail/template.twig', ['foo' => $foo, 'bar' => 'baz']);
$text->type = "text/plain";

$image = new MimePart('image.jpg');
$image->type = "image/jpeg";
$image->id = "image";
$image->encoding = Mime::ENCODING_BASE64;

$html = new MimePart('mail/template.html.twig', ['foo' => $foo, 'bar' => 'baz']);
$html->type = "text/html";

$message = new MimeMessage();
$message->parts()
    ->add($text)
    ->add($image)
    ->add($html)
;
```

As you can see it very easy to compose an e-mail message. Now you need to send it! Lets see:

```
use Slick\Mail\Transport\SmtpTransport;

$transport = new SmtpTransport([
    'options' => [
        'name' => 'localhost.localdomain',
        'host' => '127.0.0.1',
        'port' => 25,
    ]
]);

$transport->send($message);
```

> For a complete documentation on the SMTP transport object and options, as this is an extension to the Zend\\Mail\\Transport\\Smtp class, you can go to the [Zend/Mail/transport manual](http://framework.zend.com/manual/current/en/modules/zend.mail.transport.html) website.

**Contribute**

- Issue Tracker:
- Source Code:

**Support**

If you are having issues, please let us know.

**License**

The project is licensed under the MIT License (MIT)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

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

Every ~251 days

Total

5

Last Release

3145d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/101112?v=4)[fsilva](/maintainers/fsilva)[@fsilva](https://github.com/fsilva)

---

Top Contributors

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

---

Tags

mailmimee-mailHTML e-mail messagesend e-mail

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[zbateson/mail-mime-parser

MIME email message parser

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

A fully tested email parser for PHP 8.0+ (mailparse extension wrapper).

9979.6M27](/packages/php-mime-mail-parser-php-mime-mail-parser)[nette/mail

📧 Nette Mail: A handy library for creating and sending emails in PHP.

5389.8M246](/packages/nette-mail)[zbateson/stream-decorators

PHP psr7 stream decorators for mime message part streams

4748.6M6](/packages/zbateson-stream-decorators)[goetas/to-swift-mime-parser

Parse a generic mail stream, and convert it to a SwiftMailer Message

1244.4k2](/packages/goetas-to-swift-mime-parser)[bashkarev/email

Faster MIME Mail Parser could be used to parse emails in MIME format.

208.8k](/packages/bashkarev-email)

PHPackages © 2026

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