{"id":16184328,"url":"https://github.com/mattmezza/email-lang","last_synced_at":"2025-07-31T01:11:20.110Z","repository":{"id":57222801,"uuid":"82978042","full_name":"mattmezza/email-lang","owner":"mattmezza","description":"The email language","archived":false,"fork":false,"pushed_at":"2017-02-25T00:48:43.000Z","size":20,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T06:35:33.315Z","etag":null,"topics":["compiler","email","language","model","transpiler"],"latest_commit_sha":null,"homepage":null,"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/mattmezza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-23T22:34:04.000Z","updated_at":"2017-02-24T09:00:33.000Z","dependencies_parsed_at":"2022-08-28T23:23:19.321Z","dependency_job_id":null,"html_url":"https://github.com/mattmezza/email-lang","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattmezza%2Femail-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattmezza%2Femail-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattmezza%2Femail-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattmezza%2Femail-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattmezza","download_url":"https://codeload.github.com/mattmezza/email-lang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247656014,"owners_count":20974281,"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":["compiler","email","language","model","transpiler"],"created_at":"2024-10-10T07:09:51.680Z","updated_at":"2025-04-07T12:46:19.178Z","avatar_url":"https://github.com/mattmezza.png","language":"JavaScript","readme":"# SYNOPSIS\n_A language to model emails._\n\nYou can use this software in your npm project by requiring it or you can use [email-lang-cli](https://github.com/mattmezza/email-lang-cli) from your command line.\n\n# BUILD\n\n[![Travis](https://img.shields.io/travis/mattmezza/email-lang.svg)]()\n\n```bash\nnpm install --save-dev email-lang\n```\n\n# USAGE\n\n### email.txt\nWrite an email file that follows the language specification\n\n```\nFrom: \"matteomerola.me\" \u003cmattmezza@gmail.com\u003e\nSubject: Comment about the novel\nDate: February 21, 2017 at 7:02:47 AM GMT+1\nTo: Tiffany \u003ctiffany.holsen@me.com\u003e\nReply-To: Matteo \u003cmattmezza@gmail.com\u003e\n\nWe all know the numerous film adaptations of the novel!\n\nCheers,\n  Matt.\n```\n\n### index.js\nCreate an instance of the model then pass data into it one or more times.\n\n```js\nconst fs = require('fs')\nconst compile = require('email-lang')\n\nlet emails = compile(fs.readFileSync('email.txt', 'utf8'))\n\nconsole.log(emails[0].subject) // prints \"Comment about the novel\"\n```\n\n### output\n\nThe result will be an array of emails structured as follows\n\n```js\n[\n  {\n    from: {\n      name: 'Matteo',\n      email: 'mattmezza@gmail.com'\n    },\n    subject: 'The subject of the email',\n    to: {\n      name: 'Recipient',\n      email: 'recipient@email.it'\n    },\n    replyTo: {\n      name: 'Matteo',\n      email: 'mattmezza@gmail.com'\n    },\n    text: 'The body content of the email message'\n  },\n  {\n    ...// another email if any\n  }\n]\n```\n\n# LICENSE\n\nhttp://matteomerola.me\n\n[![License](https://img.shields.io/npm/l/array.from.svg)](/LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattmezza%2Femail-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattmezza%2Femail-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattmezza%2Femail-lang/lists"}