Setting up
Install the Shootmail javascript SDK
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.
const shootmailConfig : ShootMailConfig = {
shootmailApiKey: "shootmail-api-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"
}
};
Config Options
Optional fields, if skipped, will not be displayed in the mail
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.
Name of the provider like zoho
, resend
, sendgrid
, postmark
API key generated from the provider’s dashboard
Configure your email service here, you can conifgure more than one.
Hex of your brand’s primary color. This will be used to in buttons, anchor links etc.
Your brand’s logo. You can provide a single link (default) or you can provide logos for light and dark modes.
Default logo that will be shown if light
and dark
logos are not provided
Link of logo to be displayed in light mode
Link of logo to be displayed in dark mode
List of your support channels
Configure your social media handles to display icons in the mail footer