shootmail
TypeScript icon, indicating that this package has built-in type declarations

2.1.6 • Public • Published

What is Shootmail?

Shootmail is a template-first mail platform for developers, with scheduling and advanced analytics. Template-first because Shootmail has a growing list of beautiful and well-tested email templates ready to send. These templates are tested to work with major email clients like Apple Mail, Outlook, Gmail etc, also support dark mode. website

API Keys

You can generate you API key(s) from the Shootmail Dashboard

Supported Email Providers

  1. Resend
  2. Postmark
  3. SendGrid (Twilio)
  4. Zoho

More providers are being added. If you want any provider to be added on priority, let us know.

Docs

For complete documentation, checkout our docs

Usage

Install the Shootmail javascript SDK

  npm i --save shootmail

Initialize client

import { Shootmail, type ShootMailConfig } from "shootmail";

const shootmail = new Shootmail(shootmailConfig);

OR

const { Shootmail } = require("shootmail");

const shootmail = new Shootmail(shootmailConfig);

For configuration options, checkout docs

Shooting Mails

const response = await shootmail.shoot({
    templateId: "kthiazpqofgnrtm", //your template id
    from: {
        name: "Shootmail",
        email: "noreply@mail.example.app"
    },
    provider: "resend",
    to: [{ email: "hi@example.com" }],
    subject: "Regarding your Shootmail subscription",
    data: {...} // your custom variables
});

Scheduling

Pass a delay parameter to the shootmail.shoot({...}) method to schedule mail for upto 1 year in the future. The delay parameter accepts time in seconds.

const response = await shootmail.shoot({
    templateId: "kthiazpqofgnrtm",
    from: {
        name: "Shootmail",
        email: "noreply@mail.example.app"
    },
    delay: 2*60*60 //send after 2 hrs
    provider: "resend",
    to: [{ email: "hi@example.com" }],
    subject: "Regarding your Shootmail subscription",
    variables: [...]
});

Undo

Pass the requestId received while scheduling the mail to undoSchedule method.

const response = await shootmail.undoSchedule("dlsmlds2ddk3kdmsmdk");

Readme

Keywords

none

Package Sidebar

Install

npm i shootmail

Weekly Downloads

81

Version

2.1.6

License

none

Unpacked Size

284 kB

Total Files

10

Last publish

Collaborators

  • subhendupsingh