PHPackages                             kristuff/phtemail - 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. kristuff/phtemail

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

kristuff/phtemail
=================

PHP Html Email Builder

v0.2(6y ago)6282[1 issues](https://github.com/kristuff/phtemail/issues)1MITPHPPHP &gt;=7.1.0

Since May 30Pushed 6y ago2 watchersCompare

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

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

phtemail
========

[](#phtemail)

> Php Html email builder

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7f3a856edc1b08db78cafbf3ace125637ddd6a1a9da9ff9e953f032fa9fc6fb0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6b726973747566662f706874656d61696c2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/kristuff/phtemail/?branch=master)[![Build Status](https://camo.githubusercontent.com/09e321ad388b9c05b5c100de44f05155d236ab6a511edb5f6567a07f9e233296/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6b726973747566662f706874656d61696c2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/kristuff/phtemail/build-status/master)[![Latest Stable Version](https://camo.githubusercontent.com/3c289f491122118de440902c3284a3891242aefc9531999c92296c8adcbb8c19/68747470733a2f2f706f7365722e707567782e6f72672f6b726973747566662f706874656d61696c2f762f737461626c65)](https://packagist.org/packages/kristuff/phtemail)[![License](https://camo.githubusercontent.com/33fa4a0181c5abd1967b7bc87d0ad23a7c304f21827cff6d0db22006854c0c09/68747470733a2f2f706f7365722e707567782e6f72672f6b726973747566662f706874656d61696c2f6c6963656e7365)](https://packagist.org/packages/kristuff/phtemail)

Wanting to send html emails from some apps, I have used some times email templates edited by hand, meaning needing to look into boring html table structure from an extisting template, hard code the email content, or place some tags to be replaced later with real content by the code that needs to retreive the template, search replace tags, etc... That's so boring

`Kristuff\Phtemail` lets you create your template **on the fly**. Then, you are free to save it or send it immediately. The library comes with a centered layout, custom html elements for layout and email content, predefined styles, and methods / ways to customize the email as you need.

Requirments
===========

[](#requirments)

- PHP &gt;= 7.1
- Composer (for install)

Install
=======

[](#install)

- Install with composer:

    ```
    $  composer require kristuff/phtemail

    ```
- Or deploy in your project (in `composer.json`):

    ```
    {
        ...
        "require": {
            "kristuff/phtemail": ">=0.1-stable"
        }
    }

    ```

Sample
======

[](#sample)

Basic sample:

```
