Send professional invoice and billing emails that get paid faster. Clear formatting, payment links, and automatic reminders.
Send invoice emails with the TigerMail API.
interface Invoice {
id: string;
customerEmail: string;
customerName: string;
amount: number;
dueDate: string;
items: { description: string; amount: number }[];
paymentUrl: string;
}
async function sendInvoiceEmail(invoice: Invoice) {
const itemsHtml = invoice.items
.map(item => `<tr><td>${item.description}</td><td>$${item.amount.toFixed(2)}</td></tr>`)
.join("");
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({
to: [invoice.customerEmail],
from: "billing@yourcompany.com",
subject: `Invoice #${invoice.id} - $${invoice.amount.toFixed(2)} Due`,
html: `
<h1>Invoice #${invoice.id}</h1>
<p>Hi ${invoice.customerName},</p>
<p>Please find your invoice below.</p>
<table style="width: 100%; border-collapse: collapse;">
<tr style="background: #f5f5f5;">
<th style="padding: 10px; text-align: left;">Description</th>
<th style="padding: 10px; text-align: right;">Amount</th>
</tr>
${itemsHtml}
<tr style="font-weight: bold;">
<td style="padding: 10px;">Total Due</td>
<td style="padding: 10px; text-align: right;">$${invoice.amount.toFixed(2)}</td>
</tr>
</table>
<p><strong>Due Date:</strong> ${invoice.dueDate}</p>
<p>
<a href="${invoice.paymentUrl}" style="
background: #f97316;
color: white;
padding: 12px 24px;
text-decoration: none;
border-radius: 6px;
">
Pay Now
</a>
</p>
`,
}),
});
return response.json();
}Follow these guidelines for effective invoice emails.
Send professional order confirmations instantly after purchase. Keep customers informed with tracking details, order summaries, and next steps.
Keep users informed with instant notification emails. Activity alerts, status updates, and important announcements delivered reliably.
Send secure, reliable password reset emails that reach your users' inboxes instantly. Build trust with fast delivery and professional formatting.