Automatic device authorization
Windsurf can automatically open your browser to authenticate with TigerMail. No manual API key copying needed.
Start a new Cascade session in Windsurf
Give Cascade our AI instructions for TigerMail
Cascade will set up everything including authentication
Approve the generated files and start sending
This is an example of what Windsurf will generate for you.
// Windsurf/Cascade creates a full email service:
import { z } from "zod";
const emailSchema = z.object({
to: z.array(z.string().email()),
subject: z.string().min(1),
html: z.string(),
from: z.string().email(),
});
export async function sendTransactionalEmail(data: z.infer<typeof emailSchema>) {
const validated = emailSchema.parse(data);
const response = await fetch("https://tigermail.io/api/v1/send", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TIGERMAIL_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify(validated),
});
if (!response.ok) {
throw new Error(`Email failed: ${response.statusText}`);
}
return response.json();
}