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
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
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