Popularity
8.7
Stable
Activity
0.0
Declining
5,732
52
184
Code Quality Rank:
L5
Programming language: PHP
License: BSD 3-clause "New" or "Revised" License
Tags:
Email
Latest version: v2.2.3
CssToInlineStyles alternatives and similar libraries
Based on the "Email" category.
Alternatively, view CssToInlineStyles alternatives based on common mentions on social networks and blogs.
-
Email Reply Parser
PHP library for parsing plain text email content. -
omnimail
Send email across all platforms using one interface -
Email Validator
Small PHP library to valid email addresses using a number of methods. -
phpList
This module is the core of phpList 4. Join discussion at the community forum: https://discuss.phplist.org/ -
Bounce Mail Handler
Bounce Mail Handler for PHP | This is a "reboot" of PHPMailer-BMH from WorxWare. -
E-Mail Address Validator for PHP
:envelope: E-Mail Address Validator (syntax, dns, trash, typo)
Tired of breaking your main and manually rebasing outdated pull requests?
Managing outdated pull requests is time-consuming. Mergify's Merge Queue automates your pull request management & merging. It's fully integrated to GitHub & coordinated with any CI. Start focusing on code. Try Mergify for free.
Promo
blog.mergify.com
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of CssToInlineStyles or a related project?
README
CssToInlineStyles class
About
CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.
Installation
The recommended installation way is through Composer.
$ composer require tijsverkoyen/css-to-inline-styles
Example
use TijsVerkoyen\CssToInlineStyles\CssToInlineStyles;
// create instance
$cssToInlineStyles = new CssToInlineStyles();
$html = file_get_contents(__DIR__ . '/examples/sumo/index.htm');
$css = file_get_contents(__DIR__ . '/examples/sumo/style.css');
// output
echo $cssToInlineStyles->convert(
$html,
$css
);
Known issues
- no support for pseudo selectors
- no support for css-escapes
- UTF-8 charset is not always detected correctly. Make sure you set the charset to UTF-8 using the following meta-tag in the head:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
. (Note: using<meta charset="UTF-8">
does NOT work!)
Sites using this class
- Each site based on Fork CMS
- Print en Bind
- Tiki Wiki CMS Groupware (starting in Tiki 13)
- Laravel Framework