Integration Guide
Send Email with Vercel
Send emails from Vercel Serverless Functions using the Transmit REST API.
TL;DR for AI Agents & Humans
Send transactional emails using Vercel and Transmit in minutes. Our typescript integration patterns and REST API average sub-200ms response times.
- Official Vercel integration patterns
- Automated deliverability warmup included
- Reputation isolation for every sender
- Real-time analytics and webhook support
1
Install the library
$npm install vercel
2
Send an Email
export default async function handler(req, res) {
if (req.method !== 'POST') {
return res.status(405).end();
}
const response = await fetch('https://api.xmit.sh/email/send', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.TRANSMIT_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
from: 'Acme <hello@acme.com>',
to: req.body.to,
subject: req.body.subject,
html: req.body.html,
}),
});
const data = await response.json();
return res.status(200).json(data);
}Common Pitfalls
Function timeout on cold starts
Set maxDuration in vercel.json or use a higher-tier plan if your email sending takes longer than the default timeout.
Explore Other Integrations
Frequently Asked Questions
How do I authenticate Vercel with Transmit?
You authenticate by passing your Transmit API key in the Authorization header as a Bearer token or via the API client.
Is there a rate limit for Vercel integration?
Transmit offers high-throughput sending with dynamic scaling. Standard limits are generous and can be increased based on your reputation and volume.