Send professional order confirmations instantly after purchase. Keep customers informed with tracking details, order summaries, and next steps.
Send order confirmation emails with the TigerMail API.
interface OrderItem {
name: string;
quantity: number;
price: number;
}
interface Order {
id: string;
items: OrderItem[];
total: number;
customerName: string;
customerEmail: string;
shippingAddress: string;
}
async function sendOrderConfirmation(order: Order) {
const itemsHtml = order.items
.map(item => `
<tr>
<td>${item.name}</td>
<td>${item.quantity}</td>
<td>$${item.price.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: [order.customerEmail],
from: "orders@yourstore.com",
subject: `Order Confirmed #${order.id}`,
html: `
<h1>Thanks for your order!</h1>
<p>Hi ${order.customerName},</p>
<p>Order #${order.id} has been confirmed.</p>
<h2>Order Summary</h2>
<table>
<tr><th>Item</th><th>Qty</th><th>Price</th></tr>
${itemsHtml}
<tr><td colspan="2"><strong>Total</strong></td><td><strong>$${order.total.toFixed(2)}</strong></td></tr>
</table>
<h2>Shipping To</h2>
<p>${order.shippingAddress}</p>
<p><a href="https://yourstore.com/orders/${order.id}">Track Your Order</a></p>
`,
}),
});
return response.json();
}Follow these guidelines for effective order confirmation emails.
Send professional invoice and billing emails that get paid faster. Clear formatting, payment links, and automatic reminders.
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.