PHPackages                             fei/mailer-client - 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. fei/mailer-client

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

fei/mailer-client
=================

Flash mailer client

v1.1.1(5y ago)011.1k[3 issues](https://github.com/flash-global/mailer-client/issues)[3 PRs](https://github.com/flash-global/mailer-client/pulls)1GPL-3.0PHPPHP &gt;=7.0

Since Jul 23Pushed 2y ago22 watchersCompare

[ Source](https://github.com/flash-global/mailer-client)[ Packagist](https://packagist.org/packages/fei/mailer-client)[ RSS](/packages/fei-mailer-client/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (5)Dependencies (9)Versions (33)Used By (1)

Mailer client
=============

[](#mailer-client)

[![GitHub license](https://camo.githubusercontent.com/aba3100d68aafd958736f536f89a22be1a88d02a3a5061a2ebdb4872542b5205/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f666c6173682d676c6f62616c2f6d61696c65722d636c69656e742e737667)](https://github.com/flash-global/mailer-client)[![continuousphp](https://camo.githubusercontent.com/e6fddcc920c4846ac503b24272728fd199f03df822ff27a1c4255c4362a3b9a7/68747470733a2f2f696d672e736869656c64732e696f2f636f6e74696e756f75737068702f6769742d6875622f666c6173682d676c6f62616c2f6d61696c65722d636c69656e742e737667)](https://camo.githubusercontent.com/e6fddcc920c4846ac503b24272728fd199f03df822ff27a1c4255c4362a3b9a7/68747470733a2f2f696d672e736869656c64732e696f2f636f6e74696e756f75737068702f6769742d6875622f666c6173682d676c6f62616c2f6d61696c65722d636c69656e742e737667)[![GitHub issues](https://camo.githubusercontent.com/b5c836f9e200c19ebf98cf69e3633600b4c185a698b046b48161435fa6784074/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f666c6173682d676c6f62616c2f6d61696c65722d636c69656e742e737667)](https://github.com/flash-global/mailer-client/issues)

This is the client you should use to send email to Mail Api.

The client can use two kind of transports to send emails:

- Asynchronous transport implemented by `BeanstalkProxyTransport`
- Synchronous transport implemented by `BasicTransport`

`BeanstalkProxyTransport` delegate the API consumption to workers by sending email properties to a Beanstalkd queue.

`BasicTransport` use the *classic* HTTP layer to send emails.

If asynchronous transport is set, it will act as default transport. Synchronous transport will be a fallback in case when asynchronous transport fails.

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

[](#installation)

Add this requirement to your `composer.json`: `"fei/mailer-client": : "^1.0.0"`

Or execute `composer.phar require fei/mailer-client` in your terminal.

Quick start
-----------

[](#quick-start)

Let's start with a simple client :

```
