{"id":15754975,"url":"https://github.com/killmenot/nodemailer-postmark-transport","last_synced_at":"2025-04-05T10:07:20.005Z","repository":{"id":49447081,"uuid":"57722289","full_name":"killmenot/nodemailer-postmark-transport","owner":"killmenot","description":"Postmark transport for Nodemailer","archived":false,"fork":false,"pushed_at":"2025-02-17T22:35:41.000Z","size":432,"stargazers_count":33,"open_issues_count":3,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T09:08:30.905Z","etag":null,"topics":["nodemailer","postmark","postmark-templates","postmark-transport","transport"],"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/killmenot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2016-05-01T18:19:16.000Z","updated_at":"2025-03-17T05:44:31.000Z","dependencies_parsed_at":"2024-06-18T15:25:58.943Z","dependency_job_id":"88a69933-d4a2-4cd0-af10-ce3d2fcc7eac","html_url":"https://github.com/killmenot/nodemailer-postmark-transport","commit_stats":{"total_commits":88,"total_committers":4,"mean_commits":22.0,"dds":0.05681818181818177,"last_synced_commit":"8d4abaa61f126762a3ae2fc595453fd68e2e4486"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killmenot%2Fnodemailer-postmark-transport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killmenot%2Fnodemailer-postmark-transport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killmenot%2Fnodemailer-postmark-transport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killmenot%2Fnodemailer-postmark-transport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/killmenot","download_url":"https://codeload.github.com/killmenot/nodemailer-postmark-transport/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247318744,"owners_count":20919484,"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":["nodemailer","postmark","postmark-templates","postmark-transport","transport"],"created_at":"2024-10-04T08:06:10.694Z","updated_at":"2025-04-05T10:07:19.980Z","avatar_url":"https://github.com/killmenot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nodemailer-postmark-transport\n\nA Postmark transport for Nodemailer.\n\n[![Build Status](https://github.com/killmenot/nodemailer-postmark-transport/actions/workflows/ci.yaml/badge.svg?branch=master)](https://github.com/killmenot/nodemailer-postmark-transport/actions?query=branch%3Amaster) [![Coverage Status](https://coveralls.io/repos/github/killmenot/nodemailer-postmark-transport/badge.svg?branch=master)](https://coveralls.io/github/killmenot/nodemailer-postmark-transport?branch=master) [![Dependency Status](https://img.shields.io/librariesio/release/npm/nodemailer-postmark-transport)](https://libraries.io/npm/nodemailer-postmark-transport) [![npm version](https://img.shields.io/npm/v/nodemailer-postmark-transport.svg)](https://www.npmjs.com/package/nodemailer-postmark-transport) [![Known Vulnerabilities](https://snyk.io/test/npm/nodemailer-postmark-transport/badge.svg)](https://snyk.io/test/npm/nodemailer-postmark-transport) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/dc2a64fc8683487da82430d6ca3c7234)](https://www.codacy.com/gh/killmenot/nodemailer-postmark-transport/dashboard/nodemailer-postmark-transport)\n\n## Requirements\n\n| version  | Node.js  | peerDependencies   |\n|----------|:--------:|:------------------:|\n|    6.x   |    18+   |  nodemailer \u003e=6.x  |\n|    5.x   |    12+   |  nodemailer \u003e=4.x  |\n|    4.x   |    10+   |  nodemailer \u003e=4.x  |\n|    3.x   |    8+    |  nodemailer \u003e=4.x  |\n|    2.x   |    6+    |  nodemailer \u003e=4.x  |\n| \u003e=1.3 \u003c2 |    4+    |                    |\n|  \u003c1.3    |   0.10+  |                    |\n\n## Migrating from version 1.x\n\nPlease see [CHANGELOG](/CHANGELOG.md#200-2018-12-05) for more details.\n\n## Install\n\n```\nnpm install nodemailer-postmark-transport\n```\n\n## Examples\n\n### Quickstart\n\n```javascript\n'use strict';\n\nconst nodemailer = require('nodemailer');\nconst postmarkTransport = require('nodemailer-postmark-transport');\nconst transport = nodemailer.createTransport(postmarkTransport({\n  auth: {\n    apiKey: 'key'\n  }\n}));\nconst mail = {\n  from: 'john.doe@example.org',\n  to: 'jane.doe@example.org',\n  subject: 'Hello',\n  text: 'Hello',\n  html: '\u003ch1\u003eHello\u003c/h1\u003e'\n};\n\n// callback style\ntransport.sendMail(mail, function (err, info) {\n  if (err) {\n    console.error(err);\n  } else {\n    console.log(info);\n  }\n});\n\n// async/await style\ntry {\n  const info = await transport.sendMail(mail);\n  console.log(info);\n} catch (err) {\n  console.error(err);\n}\n\n```\n\n### Using Postmark templates feature\n\nRead about Postmark templates here: [Special delivery: Postmark templates](https://postmarkapp.com/blog/special-delivery-postmark-templates). Read more about template alias here: [How do I use a template alias?](https://postmarkapp.com/support/article/1117-how-do-i-use-a-template-alias)\n\n```javascript\n'use strict';\n\nconst nodemailer = require('nodemailer');\nconst postmarkTransport = require('nodemailer-postmark-transport');\nconst transport = nodemailer.createTransport(postmarkTransport({\n  auth: {\n    apiKey: 'key'\n  }\n}));\n\n// using templateId\nlet mail = {\n  from: 'john.doe@example.org',\n  to: 'jane.doe@example.org',\n  templateId: 1234,\n  templateModel: {\n    foo: 'bar'\n  }\n};\n\n// using templateAlias\nlet mail = {\n  from: 'john.doe@example.org',\n  to: 'jane.doe@example.org',\n  templateAlias: 'buzz',\n  templateModel: {\n    foo: 'bar'\n  }\n};\n\ntransport.sendMail(mail, function (err, info) {\n  if (err) {\n    console.error(err);\n  } else {\n    console.log(info);\n  }\n});\n```\n\n### Using attachments\n\nReferences to nodemailer attachments [docs](https://community.nodemailer.com/using-attachments/) and [Postmark attachments docs](http://developer.postmarkapp.com/developer-send-api.html)\n\n```javascript\n'use strict';\n\nconst nodemailer = require('nodemailer');\nconst postmarkTransport = require('nodemailer-postmark-transport');\nconst transport = nodemailer.createTransport(postmarkTransport({\n  auth: {\n    apiKey: 'key'\n  }\n}));\nconst mail = {\n  from: 'john.doe@example.org',\n  to: 'jane.doe@example.org',\n  subject: 'Hello',\n  text: 'Hello, This email contains attachments',\n  html: '\u003ch1\u003eHello, This email contains attachments\u003c/h1\u003e',\n  attachments: [\n    {\n      path: 'data:text/plain;base64,aGVsbG8gd29ybGQ=',\n      cid: 'cid:molo.txt'\n    }\n  ]\n};\n\ntransport.sendMail(mail, function (err, info) {\n  if (err) {\n    console.error(err);\n  } else {\n    console.log(info);\n  }\n});\n```\n\n### Access to Postmark.js client\n\nYou can find more details about [Postmark.js](https://github.com/wildbit/postmark.js) in documentation [here](https://wildbit.github.io/postmark.js)\n\n```javascript\n'use strict';\n\nconst nodemailer = require('nodemailer');\nconst postmarkTransport = require('nodemailer-postmark-transport');\nconst transporter = postmarkTransport({\n  auth: {\n    apiKey: 'key'\n  }\n});\nconst transport = nodemailer.createTransport(transporter);\n\n// transporter.client -\u003e reference to Postmark.js client\n// transport.mailer.transporter.client -\u003e reference to Postmark.js client\n\n```\n\n### Provide Postmark.js client with custom client options\n\n[Postmark.js](https://github.com/wildbit/postmark.js) library allows to specify configuration options for its server client. You can get more details about possible values [here](https://github.com/wildbit/postmark.js/blob/master/src/client/models/client/ClientOptions.ts#L2) and default values [here](https://github.com/wildbit/postmark.js/blob/master/src/client/BaseClient.ts#L21)\n\n```javascript\n'use strict';\n\nconst nodemailer = require('nodemailer');\nconst postmarkTransport = require('nodemailer-postmark-transport');\nconst transport = nodemailer.createTransport(postmarkTransport({\n  auth: {\n    apiKey: 'key'\n  },\n  postmarkOptions: {\n    timeout: 60\n  }\n}));\n```\n\n## Contributors\n\n[List of project's contributors!](CONTRIBUTORS.md)\n\n## License\n\n```\nThe MIT License (MIT)\n\nCopyright (c) Alexey Kucherenko\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkillmenot%2Fnodemailer-postmark-transport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkillmenot%2Fnodemailer-postmark-transport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkillmenot%2Fnodemailer-postmark-transport/lists"}