Mailtree API Guide
Mailtree is a high-performance email sending solution that comes with a developer-friendly interface. Just provide your SMTP details and send emails via API call.
Mailtree is a high-performance email sending solution that comes with a developer-friendly interface. Just provide your SMTP details and send emails via API call.
| Param Name | Description |
|---|---|
| smtp_host | SMTP Host address (e.g. Gmail: smtp.gmail.com) |
| smtp_port | Port Number (587 or 465) |
| smtp_user | Email Address of sender |
| smtp_pass | SMTP Password / Google App Password |
| to | Recipient email address |
| subject | Subject line of the email |
fetch('https://mailtree.vercel.app/send-email', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
smtp_host: "smtp.gmail.com",
smtp_port: 587,
smtp_user: "your@email.com",
smtp_pass: "app-password",
to: "receiver@email.com",
subject: "Mailtree API Test",
text: "This is a test email sent via Mailtree API"
})
}).then(res => res.json()).then(console.log);
secure parameter to true.