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

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

rcastera/mailer
===============

Mail Abstraction Class

v1.0.0(12y ago)9697MITPHPPHP &gt;=5.3.0

Since Sep 28Pushed 12y ago1 watchersCompare

[ Source](https://github.com/rcastera/Mailer)[ Packagist](https://packagist.org/packages/rcastera/mailer)[ Docs](http://www.richardcastera.com)[ RSS](/packages/rcastera-mailer/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

PHP Mail Class with Attachments
===============================

[](#php-mail-class-with-attachments)

A simple wrapper to PHP's native mail function that includes cc, bcc, priority and attachments.

### Setup

[](#setup)

---

Add a `composer.json` file to your project:

```
{
  "require": {
      "rcastera/mailer": "v1.0.0"
  }
}
```

Then provided you have [composer](http://getcomposer.org) installed, you can run the following command:

```
$ composer.phar install
```

That will fetch the library and its dependencies inside your vendor folder. Then you can add the following to your .php files in order to use the library (if you don't already have one).

```
require 'vendor/autoload.php';
```

Then you need to `use` the relevant class, and instantiate the class. For example:

### Getting Started

[](#getting-started)

---

```
require 'vendor/autoload.php';

use rcastera\Email\Mailer;

$mailer = new Mailer();
```

### Example

[](#example)

---

```
