NevarMail

Senders

Manage sender identities, verification, and automatic sender selection.

Sender identities represent the "from" addresses used when sending email. Each sender must be verified before it can be used to send messages.

Create a sender

POST /api/senders
{
  "name": "Marketing",
  "fromEmail": "marketing@yourdomain.com",
  "fromName": "Marketing Team",
  "replyToEmail": "reply@yourdomain.com",
  "provider": "sendgrid",
  "priority": 0,
  "isDefault": true
}

Sender fields

FieldTypeRequiredDescription
namestringYesSender identity name
fromEmailstringYesFrom email address
fromNamestringNoDisplay name shown to recipients
replyToEmailstringNoReply-to email address
providerstringNoAssociated provider name
prioritynumberNoPriority for automatic selection (lower = higher priority)
isDefaultbooleanNoWhether this is the default sender

Verification

When you create a sender, NevarMail initiates a verification process through the associated email provider. The sender's verificationStatus field tracks progress:

StatusDescription
pendingVerification initiated, waiting for confirmation
verifiedSender is verified and ready to use
failedVerification failed

Only verified senders can be used to send email.

List senders

GET /api/senders

Returns all sender identities with their verification status.

Update a sender

PUT /api/senders/:id
{
  "fromName": "Updated Marketing Team",
  "priority": 1
}

All fields are optional. Only provided fields are updated.

Delete a sender

DELETE /api/senders/:id

Returns { "deleted": true } on success.

Automatic sender selection

NevarMail can automatically select the best sender for each email based on configurable strategies.

POST /api/senders/select
{
  "recipientDomain": "example.com",
  "strategy": "priority"
}

Selection strategies

StrategyDescription
prioritySelect the sender with the lowest priority number
round-robinRotate between available senders
(default)Prefer the sender marked as isDefault

Response

{
  "sender": {
    "id": "...",
    "name": "Marketing",
    "fromEmail": "marketing@yourdomain.com"
  },
  "strategy": "priority",
  "reason": "Selected highest priority sender for example.com"
}

If no suitable sender is found, sender will be null.

On this page