A tool for transforming HTML emails.
Note: This repository has been archived and is no longer maintained. The tool is still available at https://alteremail.netlify.app, but it will no longer receive any updates.
git clone https://github.com/cossssmin/alter.email.git
# Navigate to project directory
cd alter.email
# Install dependencies with NPM
npm install
npm run build:lambda
npm run serve
Alter.Email comes with most transformers that power the Maizzle Email Framework.
Uses the Juice library to inline your embedded CSS.
-
Remove unused CSS
Uses email-comb to remove unused CSS.
-
Replace strings
Batch replace strings in your HTML email. Regex supported.
-
Six-digit HEX colors
Ensures that all your HEX colors are defined with six digits.
Add any number of attributes to any elements in your HTML. Tag names can also be cheerio selectors.
-
Base Image URL
Prepend a base URL to all image sources in your email. Applies to both inline and background images.
-
URL Parameters
Add any number of query string parameters to your anchor URLs. You can choose which ones should be encoded, too!
-
Prettify
Uses pretty to pretty-print your HTML code.
-
Minify
Uses html-crush to minify your HTML code.
-
Plaintext
Uses string-strip-html to generate a plaintext version of your HTML email.
-
Prevent Widow Words
Uses prevent-widows to replace spaces and hyphens at the end of a string with non-breaking equivalents.
Preview your HTML live, in a resizable iframe:
- drag the handle to horizontally-resize the preview
- while dragging, the iframe shows a viewport pixel width indicator
- double-clicking the handle resets the panes to their original widths
Shows your approximate HTML input and output file sizes, updated as-you-type.
When you're close to Gmail's clipping limit, it'll show a warning icon linked to a GitHub issue that discusses this in detail.
Have ideas for new features? Found a bug and want to squash it?
Pull requests are welcome!
However, nobody likes working hard just to see their PR rejected. So, before starting any significant amount of work, please open an issue and describe your idea.
When you open a PR, Netlify CI will automatically deploy a public build preview of your branch.