PHPackages                             tigron/skeleton-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. tigron/skeleton-email

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

tigron/skeleton-email
=====================

Email infrastructure for skeleton

v0.4.2(5mo ago)08.8k↓30%MITPHPPHP &gt;=8.2.0

Since Aug 18Pushed 5mo ago4 watchersCompare

[ Source](https://github.com/tigron/skeleton-email)[ Packagist](https://packagist.org/packages/tigron/skeleton-email)[ RSS](/packages/tigron-skeleton-email/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (35)Used By (0)

skeleton-email
==============

[](#skeleton-email)

Description
-----------

[](#description)

This library contains the email functionality of Skeleton

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

[](#installation)

Installation via composer:

```
composer require tigron/skeleton-email
composer require tigron/skeleton-template-twig

```

Howto
-----

[](#howto)

Set the path for emails

```
\Skeleton\Email\Config::$email_path = $some_very_cool_directory;

```

The email path must have the following structure

```
- media
    - sample_media_dir1
        - image1.png
        - image2.png
    - sample_media_dir2
        - image3.png
    - image4.png
- template
    - email_type1
        - html.twig
        - subject.twig
        - text.twig
    - email_type2
        - html.twig
        - subject.twig
        - text.twig

```

Each email type must have its own directory containing the following files:

- html.twig =&gt; the HTML version of the email
- subject.twig =&gt; The subject line of the email
- text.twig =&gt; The text version of the email

References to media in the mail content will be fetches from the media directory

Create a new mail:

```
$email = new \Skeleton\Email\Email('email_type1');
$email->set_sender('sender@example.com', 'Test sender');
$email->add_to('to@example.com' [, 'to name' ]);

/**
 * Optional: translate the mail with a defined Translation object
 */
$language = Skeleton\I18n\Language::get_by_id(2);
$application = 'email'; // Used to fetch the po file
$translation = Skeleton\I18n\Translation::get($language, $application);
$email->set_translation($translation);

/**
 * Optional: add different recipient types
 */
$email->add_cc('cc@example.com' [, 'cc name' ]);
$email->add_bcc('bcc@example.com' [, 'bcc name' ]);

/**
 * Optional: override any other recipient set in the code
 * if used, 'envelope_from' is also required
 */
$email->add_envelope_to('to@example.com' [, 'to name' ]);

/**
 * Optional: override any other sender set in the code
 * if used, 'envelope_to' is also required
 */
$email->set_envelope_from('from@example.com' [, 'from name' ]);

/**
 * Optional: remove all the envelope-to recipients
 */
$email->reset_envelope_to();

/**
 * Optional: add reply-to recipient
 */
$email->add_reply_to('reply-to@example.com' [, 'reply-to name' ]);

/**
 * Optional: attach file(s)
 */
$email->add_attachment(\Skeleton\File\File::get_by_id(1234));
$email->add_attachment_file('/some_very_cool_path/filename.ext');

/**
 * Optional: Archive mailbox. Send a copy of every mail to a given mailbox
 */
\Skeleton\Email\Config::$archive_mailbox = 'my_archive@example.com';

/**
 * Optional: Transport type. Send email using smtp or sendmail (default: sendmail)
 * When smtp is used at least a host and port are required.
 * Optionally you can also define which encryption is needed (ssl or tls)
 * and if authentication is required (username, password).
 */
\Skeleton\Email\Config::$transport_type = 'smtp';
\Skeleton\Email\Config::$transport_smtp_config = [
    'host' => 'smtp.example.com',
    'port' => 25,
    'encryption' => 'ssl',
    'username' => 'foo',
    'password' => 'bar'
];

/**
 * Optional: Assign variables
 */
$email->assign('variable1', 'content1');

/**
 * Send email
 */
$email->send();

```

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance70

Regular maintenance activity

Popularity23

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~121 days

Recently: every ~291 days

Total

32

Last Release

168d ago

PHP version history (2 changes)v0.1.3PHP &gt;=7.0.0

v0.4.0PHP &gt;=8.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/8bff1383483dacb0c3f89d2d3856ae03d4cf3e80de26a2998248dd1175317285?d=identicon)[tigron](/maintainers/tigron)

---

Top Contributors

[![gerryd](https://avatars.githubusercontent.com/u/3003371?v=4)](https://github.com/gerryd "gerryd (15 commits)")[![christopheg](https://avatars.githubusercontent.com/u/199087?v=4)](https://github.com/christopheg "christopheg (15 commits)")[![LionelLaffineur](https://avatars.githubusercontent.com/u/21120913?v=4)](https://github.com/LionelLaffineur "LionelLaffineur (5 commits)")[![davidvandemaele](https://avatars.githubusercontent.com/u/1914033?v=4)](https://github.com/davidvandemaele "davidvandemaele (4 commits)")[![SanderTigron](https://avatars.githubusercontent.com/u/45229883?v=4)](https://github.com/SanderTigron "SanderTigron (2 commits)")[![kvassia](https://avatars.githubusercontent.com/u/131980475?v=4)](https://github.com/kvassia "kvassia (1 commits)")[![SanderVanKeer](https://avatars.githubusercontent.com/u/10955678?v=4)](https://github.com/SanderVanKeer "SanderVanKeer (1 commits)")

### Embed Badge

![Health badge](/badges/tigron-skeleton-email/health.svg)

```
[![Health](https://phpackages.com/badges/tigron-skeleton-email/health.svg)](https://phpackages.com/packages/tigron-skeleton-email)
```

###  Alternatives

[illuminate/mail

The Illuminate Mail package.

5910.1M391](/packages/illuminate-mail)[therobfonz/laravel-mandrill-driver

Mandrill Driver for Laravel

773.5M](/packages/therobfonz-laravel-mandrill-driver)[symfony/mailjet-mailer

Symfony Mailjet Mailer Bridge

484.7M12](/packages/symfony-mailjet-mailer)[mailersend/laravel-driver

MailerSend Laravel Driver

87732.8k4](/packages/mailersend-laravel-driver)[symfony/postmark-mailer

Symfony Postmark Mailer Bridge

4717.4M34](/packages/symfony-postmark-mailer)[symfony/mailchimp-mailer

Symfony Mailchimp Mailer Bridge

275.9M17](/packages/symfony-mailchimp-mailer)

PHPackages © 2026

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