Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A PHP object library for flexible email composition and dispatching.

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 LICENSE
Octocat-spinner-32 MailHeader.php
Octocat-spinner-32 MailMessage.php
Octocat-spinner-32 MailRecipient.php
Octocat-spinner-32 README.mdown


A PHP object library for flexible email composition and dispatching. It aims to be an easy to use wrapper around PHP's native mail() function for use in object-heavy projects.


PHP 5.*

Known Issues

MailQueue is terribly inefficient for large volumes of mail recipients. This is because mail() opens and closes an SMTP socket for each email sent.

The actual Unit of Work-based mail queue is not available yet.


Feedback and suggestions are very welcome. Make use of the Issues list on Github to send input.

Forks are openly invited.

License terms

MailQueue is published under the BSD License; see the LICENSE file. You are not required to share modifications you make to the source code, but I encourage you to contribute your modifications back to the community via a Github fork or other public repository.


To use MailQueue's message objects, first include MailMessage.php in your project:


You create mail messages by instantiating the MailMessage object and using its methods to add content:

$message = new MailMessage();
$message->content('This is a test message');
$message->subject('Test Message from MailQueue');
$message->addRecipientWithNameAndAddress('John Doe', '');

Then you can use send() or batchSend() to dispatch the email as constructed.

Something went wrong with that request. Please try again.