Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Official Node.js client library for the Postmark HTTP API - https://www.postmarkapp.com
Postmark is an npm package that provides a simple and efficient way to send emails through the Postmark email service. It offers functionalities for sending transactional emails, managing email templates, and handling email events.
Send Email
This feature allows you to send a simple email using the Postmark service. You need to initialize the Postmark client with your server API token and then use the `sendEmail` method to send an email.
const postmark = require('postmark');
const client = new postmark.ServerClient('your-server-api-token');
client.sendEmail({
'From': 'sender@example.com',
'To': 'recipient@example.com',
'Subject': 'Test Email',
'TextBody': 'Hello from Postmark!'
});
Send Email with Template
This feature allows you to send an email using a predefined template. You need to specify the template ID and provide the template model data.
const postmark = require('postmark');
const client = new postmark.ServerClient('your-server-api-token');
client.sendEmailWithTemplate({
'From': 'sender@example.com',
'To': 'recipient@example.com',
'TemplateId': 123456,
'TemplateModel': {
'name': 'John Doe',
'product_name': 'Awesome Product'
}
});
Get Email Delivery Statistics
This feature allows you to retrieve email delivery statistics from Postmark. The `getDeliveryStatistics` method returns various metrics related to email delivery.
const postmark = require('postmark');
const client = new postmark.ServerClient('your-server-api-token');
client.getDeliveryStatistics().then((stats) => {
console.log(stats);
});
Nodemailer is a popular npm package for sending emails. Unlike Postmark, which is a service-specific client, Nodemailer is a general-purpose email sending library that can be used with various email services, including SMTP, AWS SES, and more.
SendGrid is another email service provider with an npm package for sending emails. Similar to Postmark, SendGrid offers functionalities for sending transactional emails, managing templates, and handling email events. However, SendGrid is known for its scalability and extensive API features.
Mailgun-js is an npm package for interacting with the Mailgun email service. It provides similar functionalities to Postmark, such as sending emails, managing templates, and handling events. Mailgun is known for its powerful email validation and analytics features.
Send emails with the greatest of ease! Postmark allows you to send your application's emails with high delivery rates, including bounce/spam processing and detailed statistics. In addition, Postmark can parse incoming emails which are forwarded back to your application.
Now your node.js application can send emails through Postmark. As the official Node.js library for Postmark, postmark.js has support for the entire REST API.
Minimum supported Node version v14.0.0
. If you use older Node versions for which
active and security support ended , you will need to use older library versions (3.x.x).
Please see the wiki for quick start tutorial and detailed instructions about sending email at our documentation page. For details about Postmark API in general, please check out Postmark developer docs.
Installing postmark
javascript library is super simple. Use the following command in your terminal:
npm install postmark
Please see wiki for more details.
Feel free to contact us if you encounter any issues with the library or Postmark API. Please leave all comments, bugs, requests and issues on the Issues page.
The Postmark JavaScript Library is licensed under the MIT license. Please refer to the LICENSE for more information.
4.0.5
FAQs
Official Node.js client library for the Postmark HTTP API - https://www.postmarkapp.com
The npm package postmark receives a total of 180,620 weekly downloads. As such, postmark popularity was classified as popular.
We found that postmark demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.