Setting up

Install the Shootmail javascript SDK

Initialize client

Shootmail Config

This is a one time setup. These settings will be used for all the mails you send.

const shootmailConfig: ShootMailConfig = {
    shootmailApiKey: "shootmail-api-key"
};

Sending Mail

const response = await shootmail.shoot({
    preHeader: "Huge price drop!",
    templateId: "sEO94SOnDhBIqvggZSS4C", // your template ID
    from: {
        name: "Shootmail",
        email: "updates@mail.shootmail.app",
    },
    provider: "shootmail",
    to: [{ email: "sps.1431990@gmail.com" }],
    subject: "Shootmail price drop",
    data: {
        button: "Explore Now"  // custom variables
    }
});