Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postmark

Package Overview
Dependencies
Maintainers
2
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postmark

Official Node.js client library for the Postmark HTTP API - https://www.postmarkapp.com

  • 4.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
221K
increased by2.43%
Maintainers
2
Weekly downloads
 
Created

What is postmark?

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.

What are postmark's main functionalities?

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);
});

Other packages similar to postmark

FAQs

Package last updated on 19 Aug 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc