PHPackages                             vitrozsival/nette-foundation-emails - 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. [Templating &amp; Views](/categories/templating)
4. /
5. vitrozsival/nette-foundation-emails

AbandonedArchivedLibrary[Templating &amp; Views](/categories/templating)

vitrozsival/nette-foundation-emails
===================================

ZURB Foundation for Emails with Inky markup integration into Nette framework.

1.0.0(8y ago)11.2k↓50%MITPHPPHP &gt;=7.0

Since Sep 29Pushed 8y ago2 watchersCompare

[ Source](https://github.com/rozsival/nette-foundation-emails)[ Packagist](https://packagist.org/packages/vitrozsival/nette-foundation-emails)[ RSS](/packages/vitrozsival-nette-foundation-emails/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (9)Versions (2)Used By (0)

Nette Foundation for Emails
===========================

[](#nette-foundation-for-emails)

[ZURB Foundation for Emails](https://github.com/zurb/foundation-emails) integration into [Nette framework](https://github.com/nette/nette) consisting of a mail factory to create email messages with [nette/latte](https://github.com/nette/latte) templates using [Inky](https://github.com/zurb/inky) markup and an optional simple mail service to send the messages.

---

[![Build Status](https://camo.githubusercontent.com/ac93ae3949cb4e8fed2487228ae3815a54187af0256605c17bad32ee5fcc0d51/68747470733a2f2f7472617669732d63692e6f72672f7465656b657939392f6e657474652d666f756e646174696f6e2d656d61696c732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/teekey99/nette-foundation-emails)[![Coverage Status](https://camo.githubusercontent.com/06f0ca31467910fbfe4786dbd770d07b56acb5e7598ce1e44306ece9794602a8/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7465656b657939392f6e657474652d666f756e646174696f6e2d656d61696c732f62616467652e737667)](https://coveralls.io/github/teekey99/nette-foundation-emails)[![Packagist](https://camo.githubusercontent.com/6529903a76a76470a76d5573b9eb110130a92d9090b0f058ee68d1b22c3e7b6c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f766974726f7a736976616c2f6e657474652d666f756e646174696f6e2d656d61696c732e737667)](https://packagist.org/packages/vitrozsival/nette-foundation-emails)[![License](https://camo.githubusercontent.com/38ce549c12e7404ba7aac66252bc37f84bf2bf940e11b80a86942a1350e74f2d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f766974726f7a736976616c2f6e657474652d666f756e646174696f6e2d656d61696c732e737667)](LICENSE)

Requirements
------------

[](#requirements)

- PHP 7.0+
- Nette 2.4+

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

[](#installation)

```
composer require vitrozsival/nette-foundation-emails
```

Configuration
-------------

[](#configuration)

Register `mailFactory` extension in your config:

```
extensions:
	mailFactory: NetteFoundationEmails\DI\MailFactoryExtension
```

Then you can configure the extension with following parameters:

```
mailFactory:
	email: 'your@email.com' # default email to be set for messages as 'sent from'
	name: 'Your Name' # default name to be set for messages as 'sent from'
	cssFilename: 'emails.css' # default stylesheet filename located in resources directory
	resourcesDir: ./resources # default resources directory path (stylesheets, images, etc.)
	templatesDir: ./templates # default message templates directory path
```

Usage
-----

[](#usage)

The `MailFactory` has only one method called `create` to be used with your email messages. It accepts two arguments:

#### `messageTemplate`

[](#messagetemplate)

- an absolute path to your own message template
- or a path relative to the configured templates directory path (if using a relative path, you can omit `.latte`extension as it will be added if needed)
- if no template is found, the method throws `MailFactoryException`

#### `cssFile` (optional)

[](#cssfile-optional)

- an absolute path to your own build of Foundation for Emails stylesheet
- or a path relative to the configured resources directory path
- if none provided, the factory will look for the configured `cssFilename` inside the configured `resourcesDir`
- if no stylesheet is found at all, default `resources/foundation-emails.min.css` will be used

The mail factory will use any valid Nette `ITranslator` from your DI container to translate your messages.

Mail service
------------

[](#mail-service)

You can also use the simple `MailService` that ships with this package to send messages created with the `MailFactory`. The service gets registered with the `MailFactoryExtension` therefor it is present in your DI container.

The service has three methods - to `createMessage` through the `MailFactory` (this method accepts same arguments as `create` method of `MailFactory` and only returns the resulting message), to create a `link` to your website using Nette `LinkGenerator` and to send the created `Message`. The `sendMessage` method throws `MailServiceException`if the message could not be sent through Nette `IMailer`.

Anyway, feel free to implement the `MailFactory` into your own mail service as you need.

License
-------

[](#license)

[MIT License](LICENSE)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

3147d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3af21e3a334be19fe9e3355c0d300a8a41e63322103aa24929e745d7cac6c965?d=identicon)[rozsival](/maintainers/rozsival)

---

Tags

foundation-emailsinkynettephp7

### Embed Badge

![Health badge](/badges/vitrozsival-nette-foundation-emails/health.svg)

```
[![Health](https://phpackages.com/badges/vitrozsival-nette-foundation-emails/health.svg)](https://phpackages.com/packages/vitrozsival-nette-foundation-emails)
```

###  Alternatives

[twig/cssinliner-extra

A Twig extension to allow inlining CSS

23018.5M55](/packages/twig-cssinliner-extra)[contributte/forms-bootstrap

Nette extension for Bootstrap forms

211.1M4](/packages/contributte-forms-bootstrap)[nepada/form-renderer

Latte template based form renderer for Nette forms with full support for Bootstrap 3, 4 &amp; 5.

11251.0k](/packages/nepada-form-renderer)[webrouse/n-asset-macro

Asset macro for Latte and Nette Framework useful for assets cache busting (with gulp, webpack, etc.)

1264.4k1](/packages/webrouse-n-asset-macro)

PHPackages © 2026

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