If you are using some other email service and are not currently willing to switch to Shootmail , though we highly recommend to because we are fast, safe and provide advanced analytics. You can use Shootmail templates and keep sending mails using any of the supported providers.

Setting up

Install the Shootmail javascript SDK
npm i --save shootmail

Initialize client

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

const shootmail = new Shootmail(shootmailConfig);

Shootmail Config

This is a one time setup. These settings will be used for all the mails you send. In this step, configure one or more email services you wish to use using providers array, like this:
    providers: [
        {
            "provider": "zoho",
            "apiKey": ZOHO
        },
        {
            "provider": "resend",
            "apiKey": RESEND
        },
        {
            "provider": "sendgrid",
            "apiKey": SENDGRID_KEY
        },
        {
            "provider": "postmark",
            "apiKey": POSTMARK_KEY
        },
    ],
So your comple configuration should look like:
const shootmailConfig: ShootMailConfig = {
        shootmailApiKey: "shootmail-api-key",
        providers: [
            {
                "provider": "zoho",
                "apiKey": ZOHO
            },
            {
                "provider": "resend",
                "apiKey": RESEND
            },
            {
                "provider": "sendgrid",
                "apiKey": SENDGRID_KEY
            },
            {
                "provider": "postmark",
                "apiKey": POSTMARK_KEY
            },
        ],
        brand: {
            color: "#1A77F2",
            logo: {
                light: "https://res.cloudinary.com/curead/image/upload/c_scale,f_auto,q_auto,w_343/v1712843877/Shootmail/logos/shootm-logo-with-name_jgdq2l.png",
                dark: "https://res.cloudinary.com/curead/image/upload/f_auto,q_auto,w_343/v1713876965/Shootmail/logos/shootm-logo-with-name-dark-mode_rziumz.png",
                default: "https://res.cloudinary.com/curead/image/upload/c_scale,f_auto,q_auto,w_343/v1712843877/Shootmail/logos/shootm-logo-with-name_jgdq2l.png",
            },
            name: "Shootmail",
            website: "https://shootmail.app",
            support: {
                email: "hi@shootmail.app",
                slack: "hi@shootmail.app"
            }
        },
        socialMedia: {
            instagram: "https://shootmail.app",
            x: "https://mystorebud1.com",
            youTube: "https://mystorebud2.com",
            meta: "https://mystorebud3.com",
            linkedIn: "https://shootmail.app"
        }
};
That’s it, now you can keep using the Shootmail SDK as mentioned in the usage docs.

Config Options

Optional fields, if skipped, will not be displayed in the mail
shootmailApiKey
string
required
API key generated from Shootmail Dashboard
providers
Array
Only required if you are not using shootmail as an email provider and are just using the templates to send emails from some other service like sendgrid, postmark, resend etc.
brand
Object
required
Configure your email service here, you can conifgure more than one.
socialMedia
Object
Configure your social media handles to display icons in the mail footer