email-lint
v0.2.3Check email HTML against caniemail.com: the CSS and HTML Outlook, Gmail and Apple Mail break.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
lint_email Lint email HTML
Check email HTML against caniemail.com support data and list the CSS and HTML features that Outlook, Gmail, Apple Mail and other clients do not support, with line numbers, affected clients and caniemail notes. Pass rendered HTML (React Email, MJML and Maizzle must be built first; laravel-react-email Blade output and plain HTML can be linted directly). With neither html nor path, lints the files from email-lint.config.json. Follow up with explain_feature for a fix.
| Parameter | Type | Description |
|---|---|---|
clients | array | Email clients to check: a family (gmail, outlook, apple-mail, yahoo, samsung-email, thunderbird, protonmail, wp-pl, ...), a family and platform (outlook.windows) or "all". Defaults to email-lint.confi… |
html | string | Email HTML to check. Use this or path. |
ignore | array | Feature slugs to skip, e.g. ["css-border-radius"]. |
path | string | File, folder or glob relative to the working directory, e.g. "emails/out" or "resources/views/react-email/**/*.blade.php". Folders are searched for .html and .htm files. Use this or html. |
strict | boolean | Also report baseline features every email needs (doctype, <style>, class selectors) and Gmail in a mobile browser. Leave off unless a full audit is asked for. |
explain_feature Explain an email feature
Explain one feature reported by lint_email: which clients lack support, the caniemail notes, whether it breaks the email (must fix) or only drops decoration (acceptable degradation), and how to fix it.
| Parameter | Type | Description |
|---|---|---|
slug * | string | Feature slug from lint_email, e.g. "css-display-flex". |
clients | array | Email clients to check: a family (gmail, outlook, apple-mail, yahoo, samsung-email, thunderbird, protonmail, wp-pl, ...), a family and platform (outlook.windows) or "all". Defaults to email-lint.confi… |