{"id":29188756,"url":"https://github.com/techwritescode/meteor-mjml","last_synced_at":"2025-07-01T22:37:03.858Z","repository":{"id":88652753,"uuid":"65413323","full_name":"techwritescode/meteor-mjml","owner":"techwritescode","description":"A MJML rendering helper for Meteor.js","archived":false,"fork":false,"pushed_at":"2018-09-26T23:29:11.000Z","size":6,"stargazers_count":11,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-29T19:30:42.501Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/techwritescode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-08-10T20:13:23.000Z","updated_at":"2021-01-21T19:26:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"38a55e68-0687-475e-bf89-84847b5572ca","html_url":"https://github.com/techwritescode/meteor-mjml","commit_stats":null,"previous_names":["techwritescode/meteor-mjml"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/techwritescode/meteor-mjml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techwritescode%2Fmeteor-mjml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techwritescode%2Fmeteor-mjml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techwritescode%2Fmeteor-mjml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techwritescode%2Fmeteor-mjml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techwritescode","download_url":"https://codeload.github.com/techwritescode/meteor-mjml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techwritescode%2Fmeteor-mjml/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263047538,"owners_count":23405278,"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":"2025-07-01T22:37:02.907Z","updated_at":"2025-07-01T22:37:03.828Z","avatar_url":"https://github.com/techwritescode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MJML For Meteor\n\nMJML is a markup language designed to reduce the pain of coding a responsive email.   [Visit MJML more information ](https://mjml.io)\n\nMJML For Meteor allows you to use MJML inside Meteor and includes\nenhanced functionality like Handlebars for conditional statements and file includes.\n\nTo include for an example a `header.mjml` file in your email template use:  `{{\u003e header }}`  and it will load that MJML file as long as the file is in the same directory.\n\nIncludes all Handlebars functionality.\n\n`API`\n\u003e\t`new MJML(filepath)`\n\n\u003e\tReturns a new MJML Email instance\n\n\u003e `.helpers(helpers)`\n\n\u003e Pass all your Handlebars helpers into this function\n\n\u003e `.compile()`\n\n\u003e Returns a compiled version of your email\n\n\u003e `.send()`\n\n\u003e Calls Meteor's `Email.send` function, more documentation [here](https://docs.meteor.com/api/email.html)\n\n### Examples:\n\nMake sure you have the `MAIL_URL` environment variable set in Meteor, see [here](https://docs.meteor.com/api/email.html).\n\n#### Basic MJML Email With Templating:\n#### `server.js`\n```javascript\nvar email = new MJML('../path-to-your/file.mjml');\nemail.helpers({\n  message:\"Hello World\"\n});\n\nemail.send({\n  to: \"to@email\",\n  from: \"from@email\",\n  subject: \"Just Testing...\"\n});\n```\n\n#### `file.mjml`\n```xml\n\u003cmjml\u003e\n    \u003cmj-body\u003e\n\t    \u003cmj-container\u003e\n\t        \u003cmj-text\u003e{{message}}\u003c/mj-text\u003e\n        \u003c/mj-container\u003e\n    \u003c/mj-body\u003e\n\u003c/mjml\u003e\n```\nThis will Compile And Send A MJML Email.\n\n#### MJML file with reuseable includes:\nExample directory structure could look like this:\n```\n├── mjml\n│   ├── header.mjml\n│   └── body.mjml\n│    server.js\n```\n\n#### `server.js`\n```javascript\n\tvar email = new MJML('./mjml/body.mjml');\n    email.helpers({\n        message: \"hello world\"\n    });\n    email.send({\n        to: \"to@email\",\n        from: \"from@email\",\n        subject: \"Hello World\"\n    });\n```\n\n#### `body.mjml`\n```xml\n\t\u003cmjml\u003e\n\t\t\u003cmj-body\u003e\n\t\t\t\u003cmj-container\u003e\n\t\t\t\t{{\u003e header }}\n\t\t\t\t\u003cmj-section\u003e\n\t\t\t\t\t\u003cmj-text\u003ethis is the other content\u003c/mj-text\u003e\n\t\t\t\t\u003c/mj-section\u003e\n\t\t\t\u003c/mj-container\u003e\n\t\t\u003c/mj-body\u003e\n\t\u003c/mjml\u003e\n```\n\n#### `header.mjml`\n```xml\n\u003cmj-section\u003e\n\t\u003cmj-image width=\"300\" src=\"http://www.online-image-editor.com//styles/2014/images/example_image.png\"\u003e\n\u003c/mj-section\u003e\n\n```\nThis will send an email with a image in the header.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechwritescode%2Fmeteor-mjml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechwritescode%2Fmeteor-mjml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechwritescode%2Fmeteor-mjml/lists"}