philtune / html-email-framework
PHP build tool for creating bullet-proof emails
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/philtune/html-email-framework
Requires
- php: >=7.4.0
This package is auto-updated.
Last update: 2025-11-29 03:36:46 UTC
README
This is a framework for us to build out consistent, error-free emails. Still very much a work in progress. The goal is to not have to think about HOW to build a bulletproof email.
Initially authored by Phil Tune in Jan 2022.
Installation
$ git clone https://github.com/philtune-discovery/Email-Framework.git
Framework Directories and Bootstrapping
Inside /framework are a few class directories and bootstrapping files.
App- has a handful of generic, App framework utility methodsDOM- dependency that manages building DOM elementsHTMLEmail- abstracts a lot of coding blocks used specifically in email developmentStyles- (todo) should manage options for painlessly managing and inserting stylesView- nice utility class for loading view files and injecting dataautoloader.php- generic class autoloader, (mostly) follows PSR-4 standardsbootstrap.php- called by../index.phpfor bootstrappingconsole.php- currently just has a quick "dump and die" function calledjson_out()definitions.php- sets a bunch of required defaults for the apphelpers.php- utility functions; this is also a good place to load any helper files found inside the class directories; helpers are more succinct ways to access class methods
Other Directories
config- PHP files that should return a value, usually for storing data separate from application logic; useconfig('path')(without the trailing.php) to return the datadist- nice place to store output and static files; you can change this inframework/definitions.phpviews- using theview('path', ['key'=>'val'])helper will return files from here; also can be changed inframework/definitions.php
Usage
On /views/pages/home.php:
use HTMLEmail\OLD\HTMLEmailz; echo HTMLEmailz::include('main'); // TODO - finish usage documentation
Contributing
Pull requests are welcome. As industry best practices and techniques (as well as our own unique needs) evolve, this framework can and should be updated.