Email Service
Configure SMTP settings, manage email templates, send transactional emails, and preview templates — all per-project.
📧
Bring Your Own SMTP
Connect any SMTP provider — SendGrid, AWS SES, Mailgun, Postmark, or your own server. Passwords are encrypted at rest and masked in API responses.
SMTP Configuration
PUT /projects/{project_id}/email/smtpConfigure
{
"host": "smtp.sendgrid.net",
"port": 587,
"username": "apikey",
"password": "SG.xxxx...",
"from_email": "noreply@myapp.com",
"from_name": "My App"
}
// Get current settings (password masked)
GET /projects/{project_id}/email/smtp
// Test SMTP connectivity
POST /projects/{project_id}/email/smtp/testEmail Templates
zMesh ships default templates for common auth flows. Customize subject, HTML body, and enable/disable per template.
signup
Welcome email sent after user registration
invite
Team/org invitation email with join link
password-reset
Password reset link email
Template Management
// List all templates
GET /projects/{project_id}/email/templates
// Get specific template
GET /projects/{project_id}/email/templates/signup
// Update template
PUT /projects/{project_id}/email/templates/signup
{
"subject": "Welcome to {{app_name}}!",
"html_body": "<h1>Welcome, {{name}}!</h1><p>...</p>",
"enabled": true
}
// Preview with sample data
POST /projects/{project_id}/email/templates/signup/preview
// Send test email
POST /projects/{project_id}/email/templates/signup/send-test
{ "email": "test@example.com" }
// Reset to default
POST /projects/{project_id}/email/templates/signup/resetAPI Reference
| Method | Path | Description |
|---|---|---|
| GET | /email/smtp | Get SMTP settings (masked) |
| PUT | /email/smtp | Configure SMTP |
| POST | /email/smtp/test | Test SMTP connectivity |
| GET | /email/templates | List all templates |
| GET | /email/templates/{type} | Get template details |
| PUT | /email/templates/{type} | Update template |
| POST | /email/templates/{type}/preview | Preview with sample data |
| POST | /email/templates/{type}/send-test | Send test email |
| POST | /email/templates/{type}/reset | Reset to default |