Providers
Configure email providers, monitor health, and manage rate limits.
Providers are the email delivery services that NevarMail uses to send your emails. You can configure multiple providers for redundancy and automatic failover.
Supported providers
| Provider | Type | Environment Variables |
|---|---|---|
| SendGrid | sendgrid | SENDGRID_API_KEY |
| Mailgun | mailgun | MAILGUN_API_KEY, MAILGUN_DOMAIN |
| Amazon SES | ses | AWS_SES_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY |
| Postmark | postmark | POSTMARK_SERVER_TOKEN |
| SMTP | smtp | SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASS |
Add a provider
POST /api/providers
{
"name": "SendGrid Production",
"type": "sendgrid",
"config": { "region": "us" },
"priority": 0,
"rateLimitPerMinute": 100,
"rateLimitPerHour": 5000,
"rateLimitPerDay": 50000
}Provider fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name for this provider |
type | string | Yes | Provider type (see table above) |
config | object | No | Provider-specific configuration |
priority | number | No | Priority for provider selection (lower = higher priority) |
rateLimitPerMinute | number | No | Maximum sends per minute |
rateLimitPerHour | number | No | Maximum sends per hour |
rateLimitPerDay | number | No | Maximum sends per day |
List providers
GET /api/providersReturns all configured providers with their health status and current usage counts.
Provider health
NevarMail monitors each provider's health status automatically. You can also check a specific provider's status:
GET /api/providers/:id/status{
"id": "...",
"name": "SendGrid Production",
"isHealthy": true,
"lastHealthCheck": "2026-03-22T12:00:00.000Z",
"usageMinute": 5,
"usageHour": 120,
"usageDay": 1500,
"rateLimitPerMinute": 100,
"rateLimitPerHour": 5000,
"rateLimitPerDay": 50000
}Test a connection
Verify that a provider is correctly configured and reachable:
POST /api/providers/:id/test{
"success": true,
"latencyMs": 750,
"message": "Successfully connected to SendGrid"
}Update a provider
PUT /api/providers/:id
{
"rateLimitPerDay": 100000,
"priority": 1
}Delete a provider
DELETE /api/providers/:idReturns { "removed": true } on success.
Auto-detection
NevarMail can detect which providers are available based on environment variables:
GET /api/config/providers[
{ "name": "SendGrid", "type": "sendgrid", "configured": true },
{ "name": "Mailgun", "type": "mailgun", "configured": false },
{ "name": "AWS SES", "type": "ses", "configured": false },
{ "name": "Postmark", "type": "postmark", "configured": false }
]Failover
When a provider becomes unhealthy or reaches its rate limit, NevarMail automatically routes emails to the next available provider based on priority. This happens transparently -- your sending code does not need to change.
Configure multiple providers with different priorities to enable automatic failover:
| Provider | Priority | Role |
|---|---|---|
| SendGrid | 0 | Primary |
| Mailgun | 1 | Secondary |
| Amazon SES | 2 | Tertiary |