About SendGrid
SendGrid (by Twilio) is a cloud-based email platform handling both transactional and marketing emails. It’s known for high deliverability and extensive features.
Website: sendgrid.com
Prerequisites
- A SendGrid account
- A verified sender identity
- An API key with Mail Send permissions
Getting Your API Key
- Log in to SendGrid
- Go to Settings > API Keys
- Click Create API Key
- Choose Restricted Access
- Under Mail Send, enable Full Access
- Click Create & View
- Copy the key (starts with
SG.)
Configuration
Add SendGrid in mailshit:
- Go to Settings > Providers
- Click Add Provider
- Select SendGrid
- Enter the following:
| Field | Description | Example |
|---|---|---|
| API Key | Your SendGrid API key | SG.abc123... |
| From Email | Verified sender email | hello@yourdomain.com |
| From Name | Display name (optional) | Your Company |
- Click Save
Sender Verification
SendGrid requires sender verification:
Single Sender Verification
For testing or low volume:
- Go to Settings > Sender Authentication
- Click Verify a Single Sender
- Enter sender details
- Click the verification link in your email
Domain Authentication
For production (recommended):
- Go to Settings > Sender Authentication
- Click Authenticate Your Domain
- Add the DNS records SendGrid provides
- Wait for verification
Free Tier
SendGrid’s free tier includes:
- 100 emails/day forever
- No credit card required
- Basic analytics
API Key Permissions
For mailshit, your API key needs:
- Mail Send - Full Access
- Other permissions are optional
Restricted permissions improve security.
Example Response
{
"success": true,
"type": "sent",
"messageId": "sg_abc123xyz..."
}
Best Practices
- Use domain authentication for better deliverability
- Create dedicated API keys for each application
- Monitor suppressions in SendGrid’s Activity Feed
- Set up event webhooks to track bounces and complaints
Troubleshooting
“The from address does not match a verified Sender Identity”
- Complete sender verification in SendGrid
- Use a verified email address
“Forbidden” (403 error)
- Check API key has Mail Send permissions
- Regenerate the key if needed
Emails going to spam
- Complete domain authentication
- Check your sender reputation in SendGrid
- Review email content for spam triggers