This is a port of Bootstrap Email. Thanks to @stuyam!
To install, add it to your composer.json
file:
{
"require": {
"antibodies-online/bootstrap-email": "master"
}
}
or direct from packagist
composer require antibodies-online/bootstrap-email
You can use different methods to convert your boostrap-email html to an email client compatible html.
$scss = new ScssCompiler();
// Create a DOM Document
$doc = new DOMDocument('1.0', 'UTF-8');
\libxml_use_internal_errors(true);
$doc->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
\libxml_clear_errors();
$converter = new Compiler($scss);
$doc = $converter->convert($doc);
$html = $doc->saveHTML();
$scss = new ScssCompiler();
$converter = new Compiler($scss);
$html = $converter->compileHtml(<MY HTML STRING>);
$scss = new ScssCompiler();
$scss->setScssFile(<PATH TO YOUR CUSTOM SCSS FILE);
$scss->setScssHeadFile(<PATH TO YOUR CUSTOM HEAD SCSS FILE);
$converter = new Compiler($scss);
$html = $converter->compileHtml(<MY HTML STRING>);
composer test
- Add Stack https://bootstrapemail.com/docs/stack
For full documentation, visit bootstrapemail.com
Really appreciate bug reports. Feel free to ask for additional functionality/fields. But be aware not all feature may be implemented. A Pull Request for your Features would be amazing.
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
Discuss Bootstrap Email on GitHub
For PHP Port related questions, please open an issue.