Send Email + PDF in One API Call
Stop stitching together SendGrid and DocRaptor.
Create email and PDF templates. Send with dynamically generated attachments in one API call.
// The FormaMail way: Email + PDF Invoice in one call
const response = await fetch('https://api.formamail.com/api/emails/send', {
method: 'POST',
headers: {
'Authorization': 'Bearer your-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
templateId: "order-confirmation",
to: [{ email: "customer@example.com", name: "John Doe" }],
variables: {
orderId: "12345",
customerName: "John Doe",
items: [{ name: "Widget", qty: 2, price: 29.99 }],
total: 59.98
},
attachments: [{
attachmentTemplateId: "invoice-pdf"
}]
})
});
// That's it. Email sent with PDF invoice attached.Why FormaMail?
One API Call
Send email + generate PDF + attach file. All in a single POST request.
Same Visual Designer
Design email, PDF, and Excel templates with the same intuitive drag-and-drop editor.
Visual Designer
Design email and PDF templates in the same drag-and-drop editor.
Explore Documentation
Getting Started - Your first email in 5 minutes
Generate with AI - Use ChatGPT/Claude
Sending with Attachments - Email + PDF/Excel
Template Designer - Visual editor guide
All Tutorials - Step-by-step guides
Integrations - OAuth, Webhooks, and more
API Reference - Complete endpoint documentation
Security & Compliance - SOC2, GDPR, data handling
Need Help?