PHPackages                             ionvv/wp-mail-helper - 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. ionvv/wp-mail-helper

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

ionvv/wp-mail-helper
====================

PHP package to send custom emails with WordPress.

1.0.0(6y ago)114MITPHPPHP &gt;=7.0

Since Apr 14Pushed 6y ago1 watchersCompare

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

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

WP Mail Helper
==============

[](#wp-mail-helper)

WP Mail Helper is a package to help WordPress developers to send custom emails.

Getting Started
---------------

[](#getting-started)

### Minimum requirements and dependencies

[](#minimum-requirements-and-dependencies)

WP Mail Helper requires:

- PHP 7+
- WordPress - latest
- Composer to be installed

### Installation

[](#installation)

Install via composer

```
composer require ionvv/wp-mail-helper

```

Usage
-----

[](#usage)

### Basic usage

[](#basic-usage)

```
$email_controller = new \WpMailHelper\Email();
$email_controller->sendEmail(
    'recipient@domain.tld', // $to
    'sender@domain.tld',    // $from
    'Email subject',        // $subject
    'Email content'         // $message
);

```

### Advanced usage

[](#advanced-usage)

```
$email_controller->sendEmail(
    'recipient@domain.tld', // $to
    'sender@domain.tld',    // $from
    'Email subject',        // $subject
    'Email content',        // $message
    'template',             // $message_type
    [],                     // $headers
    'john.doe@domain.tld',  // $cc
    'john.doe@domain.tld',  // $bcc
    [WP_CONTENT_DIR . '/uploads/dummy-file.zip']
);

```

### Use a post as email content

[](#use-a-post-as-email-content)

```
$email_controller = new \WpMailHelper\Email();
$email_controller->sendEmail(
    'recipient@domain.tld', // $to
    'sender@domain.tld',    // $from
    'Email subject',        // $subject
    '$post->ID',            // $message
    'post'                  // $message_type
);

```

### Use a custom template as email content

[](#use-a-custom-template-as-email-content)

```
$email_controller = new \WpMailHelper\Email();
$email_controller->sendEmail(
    'recipient@domain.tld',                               // $to
    'sender@domain.tld',                                  // $from
    'Email subject',                                      // $subject
    get_stylesheet_directory() . '/emails/template.html', // $message
    'template'                                            // $message_type
);

```

### Use custom variables in email content

[](#use-custom-variables-in-email-content)

Sometimes you'll have to replace some variables programatically in your emails. You can use the 'shortcodes' in the email subject and content. Check the following example to see how you can use them:

```
$email_subject = 'Welcome to our website, {{FIRST_NAME}}';
$email_content = 'Dear {{FIRST_NAME}}, thanks for joining our website. You have been registered with the following email address: {{EMAIL_ADDRESS}}';

$email_controller = new \WpMailHelper\Email();
$email_controller->setVars(
    [
        'FIRST_NAME' => 'Ion',
        'EMAIL_ADDRESS' => 'ion@domain.tld'
    ],
    [
        'FIRST_NAME' => 'Ion'
    ]
);
$email_controller->sendEmail(
    'ion@domain.tld',       // $to
    'sender@domain.tld',    // $from
    $email_subject,         // $subject
    $email_content          // $message
);

```

User will receive an email with the following subject:

```
Welcome to our website, Ion

```

and the content:

```
Dear Ion, thanks for joining our website. You have been registered with the following email address: ion@domain.tld

```

---

Changelog
---------

[](#changelog)

### 1.0.0

[](#100)

- Initial release

---

License
-------

[](#license)

WP Mail Helper code is licensed under MIT license.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2218d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19579608?v=4)[Ion V](/maintainers/ionvv)[@ionvv](https://github.com/ionvv)

---

Top Contributors

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

---

Tags

wordpressWordPress emailWordPress email templateWordPress custom email

### Embed Badge

![Health badge](/badges/ionvv-wp-mail-helper/health.svg)

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

###  Alternatives

[humanmade/aws-ses-wp-mail

WordPress plugin to send mail via SES

188250.3k4](/packages/humanmade-aws-ses-wp-mail)[itinerisltd/wp-phpmailer

WP PHPMailer provides a clean and simple way to configure WordPress-bundled PHPMailer library, allowing you to quickly get started sending mail through a local or cloud based service of your choice.

6231.6k](/packages/itinerisltd-wp-phpmailer)

PHPackages © 2026

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