{"id":13852084,"url":"https://github.com/crcn/emailify","last_synced_at":"2025-07-13T03:33:12.389Z","repository":{"id":2576451,"uuid":"3556989","full_name":"crcn/emailify","owner":"crcn","description":"Make HTML pages email-safe","archived":true,"fork":false,"pushed_at":"2015-10-08T19:09:58.000Z","size":484,"stargazers_count":39,"open_issues_count":6,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-19T05:46:20.145Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crcn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-02-27T03:21:50.000Z","updated_at":"2023-01-28T19:26:14.000Z","dependencies_parsed_at":"2022-08-28T23:11:47.850Z","dependency_job_id":null,"html_url":"https://github.com/crcn/emailify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crcn%2Femailify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crcn%2Femailify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crcn%2Femailify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crcn%2Femailify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crcn","download_url":"https://codeload.github.com/crcn/emailify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225844842,"owners_count":17533160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T22:00:59.324Z","updated_at":"2024-11-22T06:30:58.488Z","avatar_url":"https://github.com/crcn.png","language":"JavaScript","readme":"### This library is not actively maintained.\n\n[![build status](https://secure.travis-ci.org/crcn/emailify.png)](http://travis-ci.org/crcn/emailify)\n### Emailify makes your html documents a bit more email-safe\n\nThis is the node.js version of [premailer](http://premailer.dialect.ca/).\n\n### Features\n\n- Copies `\u003cstyle /\u003e`, and `\u003clink /\u003e` data to associated elements.\n- Strips out comments by default, but you can optionally keep them, this is useful if you intend to use VML to provide background-images.\n- HTML compatibility checking for popular email clients. See:\n\t- http://www.campaignmonitor.com/css/\n\t- http://www.campaignmonitor.com/downloads/documents-tools/campaign-monitor-guide-to-css-in-email-sept-2011.pdf\n\t- http://www.email-standards.org/\n\n### HTML Example\n\nTurns this:\n\n```html\n\u003chtml\u003e\n\t\u003chead\u003e\n\t\t\u003cstyle\u003e\n\t\t\th4 {\n\t\t\t\tcolor: #ff6600;\n\t\t\t}\n\t\t\u003c/style\u003e\n\t\u003c/head\u003e\n\t\u003cbody\u003e\n\t\t\u003ch4\u003eorange header\u003c/h4\u003e\n\t\u003c/body\u003e\n\u003c/html\u003e\n```\n\nInto this:\n\n```html\n\u003chtml\u003e\n\t\u003chead\u003e\n\t\u003c/head\u003e\n\t\u003cbody\u003e\n\t\t\u003ch4 style=\"color: #ff6600;\"\u003eorange header\u003c/h4\u003e\n\t\u003c/body\u003e\n\u003c/html\u003e\n```\n\n### Testing Compatibility Screenshot\n\n![Alt command line](http://i.imgur.com/AUX7z.png)\n\n### Requirements\n\n- [Node.js](http://nodejs.org/)\n\n### Installation\n\n```\nnpm install emailify -g\n```\n\n\n### Command Line\n\n#### Usage\n\n```\n-i [input_html] -o [output_html]\n\nOptions:\n  -i, --input    [required]\n  -o, --output  \n  -t, --test     [default: false]\n  -c, --comments [default: false]\n```\n\nTo emailify a document, use this command:\n\n```bash\nemailify -i /my/html/file.html -o /my/html/emailified.html\n```\nIf you intend to keep comments, do the following:\n\n```bash\nemailify -c true -i /my/html/file.html -o /my/html/emailified.html\n```\n\nYou can easily test a document for compatibility by adding the `-t` flag:\n\n```bash\nemailify -i /my/html/file.html -o /my/html/emailified.html -t\n```\n\nOmmit `-o` if you just want to see what emailify produces:\n\n```bash\nemailify -i /my/html/file.html\n```\n\n\n\n\n\n### Node.js API\n\n#### .parse(content[, options], callback)\n\nparses html content into email-safe html\n\n- `content` - the html content\n- `options`\n\t- `test` - runs test against code for compatibility\n\n\n```javascript\nvar emailify = require('emailify'),\nfs           = require('fs')\n\nemailify.parse(fs.readFileSync('/my/email/newsletter.html', 'utf8'), function(err, content) {\n\t//send newsletter\n});\n```\n\n#### .load(file[, options], callback)\n\n\nloads a html file\n\n```javascript\nvar emailify = require('emailify'),\nfs           = require('fs')\n\nemailify.load('/my/email/newsletter.html', { test: true }, function(err, content, warnings) {\n\t//send newsletter\n});\n```\n\n\n\n\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrcn%2Femailify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrcn%2Femailify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrcn%2Femailify/lists"}