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
You can generate you API key(s) from the Shootmail Dashboard
- Resend
- Postmark
- SendGrid (Twilio)
- Zoho
More providers are being added. If you want any provider to be added on priority, let us know.
For complete documentation, checkout our docs
Install the Shootmail javascript SDK
npm i --save shootmail
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
const response = await shootmail.shoot({
templateId: "kthiazpqofgnrtm",
from: {
name: "Shootmail",
email: "noreply@mail.example.app"
},
provider: "resend",
to: [{ email: "hi@example.com" }],
subject: "Regarding your Shootmail subscription",
variables: [...]
});
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: [...]
});
Pass the requestId
received while scheduling the mail to undoSchedule
method.
const response = await shootmail.undoSchedule("dlsmlds2ddk3kdmsmdk");