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/test

Email 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/reset

API Reference

MethodPathDescription
GET/email/smtpGet SMTP settings (masked)
PUT/email/smtpConfigure SMTP
POST/email/smtp/testTest SMTP connectivity
GET/email/templatesList all templates
GET/email/templates/{type}Get template details
PUT/email/templates/{type}Update template
POST/email/templates/{type}/previewPreview with sample data
POST/email/templates/{type}/send-testSend test email
POST/email/templates/{type}/resetReset to default