Deliver your store's order receipts, password resets, invoices and alerts through a SendGrid account, with bounces and spam complaints fed back so dead addresses are never mailed again.
About 15 minutes. Domain authentication adds a DNS wait of up to 48 hours; a Single Sender is instant.
Before you start
A SendGrid account (the free plan is enough to start).
Access to the DNS of the domain you want to send from, OR a single mailbox you can receive at (for Single Sender).
Access to the Slaby deployment's environment settings (this is set once for the platform, not per store).
Step by step
1
Create your SendGrid account
In your SendGrid dashboard
Sign up with the email address you run the platform from. SendGrid may ask a few questions about your business and hold the account for a short review before it lets you send — that is normal and usually clears within a day.
This account is yours. Slaby only ever asks it to send mail on your behalf; it never reads your contacts or changes your settings.
SendGrid refuses to send from any address it has not checked belongs to you. There are two ways to prove it, and you only need one to start.
Single Sender verifies one mailbox: SendGrid emails it a link, you click it, done. Domain Authentication verifies your whole domain by adding the CNAME records SendGrid shows you at your DNS provider — it takes longer, but mail from an authenticated domain lands in the inbox far more reliably, so do it before you send to real buyers.
Single Sender — one address, verified by email, ready in a minute.
Domain authentication — your whole domain, verified by DNS records, the right choice before you send to real buyers.
The address in EMAIL_FROM must be EXACTLY the verified one (or on the authenticated domain). Anything else is refused by SendGrid with a 403 and nothing is delivered.
3
Create an API key with Mail Send only
In your SendGrid dashboard
In the SendGrid dashboard go to Settings → API Keys → Create API Key. Give it a name you will recognise later (for example 'Slaby sending'), choose Restricted Access, and turn on only Mail Send. Leave every other permission off.
Click Create & View. The key is shown exactly once and starts with SG. — copy it somewhere safe before you close the dialog, because SendGrid cannot show it to you again.
Full Access keys can read your contacts and change your account. Slaby only ever needs Mail Send — give it nothing more, and if the key is ever lost, delete it in SendGrid and create a new one.
4
Add the key to the Slaby environment
In your Slaby admin
Email is configured for the whole platform, not inside any store's admin, so this step happens in the deployment's environment settings (on Vercel: Settings → Environment Variables).
Set SENDGRID_API_KEY to the key you just copied, and EMAIL_FROM to the address you verified — in the form Your Store <orders@yourdomain.com> if you want a display name. If settings for more than one email provider exist, also set EMAIL_PROVIDER=sendgrid so there is no doubt which one is used. Then redeploy so the new environment is live.
Secrets live only in the deployment environment — they are never shown in any admin screen.
If Amazon SES settings are also present, SES is used unless EMAIL_PROVIDER says sendgrid.
EMAIL_PROVIDER must be exactly ses, sendgrid or resend. A misspelling sends nothing at all rather than quietly picking another provider — the Email health panel will say Not configured.
5
Turn on the Event Webhook so bad addresses stop being mailed
In your SendGrid dashboard
When an address bounces or a recipient marks your mail as spam, SendGrid can tell Slaby about it so that address is never mailed again — from any store. Without this, dead addresses keep being tried and your sending reputation quietly erodes.
Go to Settings → Mail Settings → Event Webhook → Create new webhook. For the HTTP POST URL enter https://<platform host>/api/webhooks/sendgrid (the address the console runs on, not a store address). Under the events to deliver, tick Bounced, Dropped and Spam Reports — the others are optional and Slaby ignores them.
Turn Signed Event Webhook ON. SendGrid shows a Verification Key; copy it and save it in the deployment environment as SENDGRID_WEBHOOK_PUBLIC_KEY, then redeploy.
Without the Verification Key Slaby rejects every notification (that is deliberate — an unsigned notification could be anyone), so the webhook does nothing until the key is set.
6
Send a test
In your Slaby admin
Go to Settings → Email health and use Send test email to send one to yourself. Confirm it arrives and that the panel names SendGrid as the provider in use.
7
Test the webhook
In your SendGrid dashboard
Back in the Event Webhook screen, use Test Your Integration. Slaby should answer 200 — if it does, bounces and complaints will reach you from now on.
Use the platform's own address (the one the console runs on), not a store address — email is configured once for the whole platform.
Event to subscribe to
bounce
The address does not exist or the mailbox rejected the message for good. Slaby stops mailing it.
Event to subscribe to
spamreport
The recipient marked your mail as spam. Slaby stops mailing them so your sending reputation is protected.
Event to subscribe to
dropped
SendGrid refused to send because it already knows the address is dead or has complained.
SendGrid signs each notification with a key pair. You copy the PUBLIC Verification Key from the Event Webhook screen into SENDGRID_WEBHOOK_PUBLIC_KEY — there is no secret to invent, and the API key is not involved.
Test it before you go live
1.Send yourself a test from Settings → Email health and check it lands (look in spam too; if it is there, finish Domain Authentication).
2.In SendGrid, open Activity to see the message as Delivered.
3.Use Test Your Integration on the Event Webhook screen — Slaby should answer 200 and the sample bounce address will appear in your suppression list.
4.Send to a deliberately bad address at your own domain and confirm it shows as Bounced in SendGrid and suppressed in Slaby.
If something goes wrong
Every send fails with a 403.
Why it happens: EMAIL_FROM is not a verified Single Sender and not on an authenticated domain.
How to fix it: Verify that exact address in Sender Authentication, or set EMAIL_FROM to the address you did verify.
Sends fail with a 401.
Why it happens: The API key is wrong, was deleted, or was pasted with a space.
How to fix it: Create a new Mail Send key, replace SENDGRID_API_KEY, redeploy.
Mail still goes out through Amazon SES.
Why it happens: SES settings are present and SES comes first unless told otherwise.
How to fix it: Set EMAIL_PROVIDER=sendgrid, or remove the SES_SMTP_* values.
Webhook deliveries show 401 in SendGrid.
Why it happens: Signed Event Webhook is off, or the Verification Key is missing or mismatched in Slaby.
How to fix it: Turn signing on, copy the current Verification Key into SENDGRID_WEBHOOK_PUBLIC_KEY, redeploy.
Mail lands in spam.
Why it happens: Single Sender only, no domain authentication.
How to fix it: Complete Domain Authentication (DKIM/SPF records) and add a DMARC record.