PHPackages                             wpscholar/wp-email - 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. wpscholar/wp-email

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

wpscholar/wp-email
==================

A WordPress library to simplify sending emails.

1.0.2(7y ago)112.9k4GPL-2.0-or-laterPHP

Since Oct 24Pushed 7y ago2 watchersCompare

[ Source](https://github.com/wpscholar/wp-email)[ Packagist](https://packagist.org/packages/wpscholar/wp-email)[ RSS](/packages/wpscholar-wp-email/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (4)Used By (0)

WordPress Email
===============

[](#wordpress-email)

A WordPress library to simplify sending emails.

What It Does
------------

[](#what-it-does)

While WordPress does have the wp\_mail() function, there are still a number of things you have to be aware of when sending emails. For example:

- You have to add a special filter to send an HTML email.
- You have to add a special filter to set the from name and/or email.
- Special characters in the email subject line or from name may not show properly if not properly decoded.
- To add CC or BCC recipients to an email, you have to add special headers.
- Email recipients have to be properly formatted if you want to include a name.
- Adding filters can impact other emails sent via the system.

This library removes these concerns and makes it easy to setup and send emails without impacting other emails being sent from the system.

How to Use It
-------------

[](#how-to-use-it)

1. Add to your project via [Composer](https://getcomposer.org/):

```
$ composer require wpscholar/wp-email
```

2. Make sure you have added the Composer autoloader to your project:

```
