PHPackages                             phore/mail - 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. phore/mail

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

phore/mail
==========

v0.1.5(2y ago)08.6kMITShellPHP &gt;7.0

Since Jul 25Pushed 2y ago1 watchersCompare

[ Source](https://github.com/phore/phore-mail)[ Packagist](https://packagist.org/packages/phore/mail)[ RSS](/packages/phore-mail/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (5)Dependencies (3)Versions (6)Used By (0)

Phore Mail
==========

[](#phore-mail)

A template wrapper around the famous *[PHPMailer](https://github.com/PHPMailer/PHPMailer)*Mailer class and the *[text/template](https://github.com/dermatthes/text-template)* template system.

- Single Class
- Multipart Mime
- Testing using [mailtrap.io](https://mailtrap.io)

Demo template
-------------

[](#demo-template)

```
{mail to="abc@abc.de" name="Some Name"}
{mail from="sender@address.de" name="Me"}
{mail cc="mail@email" name="Some Name"}
{mail bcc="mail@email" name="Some Name"}
{subject}Hello {=name} - You are the welcome{/subject}

{html}

        Hello {= name},

            This HTML Mime Mail

{/html}

Hello {= name},

This is the alternative Text body

```

Available mail parameters
-------------------------

[](#available-mail-parameters)

ParameterNameDefault`charset``to``from``cc``bcc`Script for sending a mail
-------------------------

[](#script-for-sending-a-mail)

With auto-failover to second SMTP-Server.

```
$mailer = new PhoreMailer();
$mailer->config([
    "Host"      => "smtp1.example.org;smtp2.example.org",
    "Username"  => "user@example.org",
    "Password"  => "secret",
    "SMTPAuth"  => true
]);
$mailer->send($templateText, ["name"=>"Joe Doe"]);
```

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

[](#installation)

```
composer require phore/mail

```

Configuring PHPMailer / text-template
-------------------------------------

[](#configuring-phpmailer--text-template)

```
$mailer = new PhoreMailer();
$mailer->phpmailer->phpMailerFunction();
```

```
$mailer = new PhoreMailer();
$mailer->textTemplate->textTemplateFunction();
```

Sending mail without mailserver using SMTP
------------------------------------------

[](#sending-mail-without-mailserver-using-smtp)

> This method is for testing only. Most Mailservers will reject mail transferred with this method.

```

```

Demos
-----

[](#demos)

- [Basic/simple template sending mail](docs/simple-demo.php)
- [SMTP Auth](docs/smtp-auth-demo.php)
- [Setting charset](docs/setting-charset.php)

Debugging
---------

[](#debugging)

Instead of sending the mail, you can retrieve the PHPMailer instance by calling `prepare()`.

```
$phpmail = $phoreMailer->prepare($template,[]);
print_r ($phpmail);
$phpmail->Send();

```

Intercepting outgoing mail
--------------------------

[](#intercepting-outgoing-mail)

```
$mailer->setSendMailFunction(function (PHPMailer $mail, PhoreMailer $phoreMailer) {
     $res["to"] = $mail->getAllRecipientAddresses();
     $res["subject"] = $mail->Subject;
     $res["html"] = $mail->Body;
     $res["text"] = $mail->AltBody;
});
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

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

Every ~449 days

Total

5

Last Release

1057d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/878a384d056698a2400e4b7c8858db05a6caebb2c560e67151be36d46d58def0?d=identicon)[dermatthes](/maintainers/dermatthes)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/phore-mail/health.svg)

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

###  Alternatives

[ivantcholakov/codeigniter-phpmailer

A CodeIgniter 3 compatible email-library powered by PHPMailer.

25313.9k](/packages/ivantcholakov-codeigniter-phpmailer)[markguinn/silverstripe-email-helpers

Silverstripe extension containing SMTP mailer class and some other classes for HTML emails

3145.4k1](/packages/markguinn-silverstripe-email-helpers)[msp/smtp

SMTP with PHPMailer

2129.4k](/packages/msp-smtp)[nfephp-org/sped-mail

API para geração e envio dos emails relacionados com o SPED.

1123.7k](/packages/nfephp-org-sped-mail)

PHPackages © 2026

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