Send email through MXroute SMTP servers via a simple JSON API.
Send a JSON payload with Content-Type: application/json.
| Field | Type | Required | Description |
|---|---|---|---|
| server | string | Yes | MXroute SMTP hostname (must be an allowed server) |
| username | string | Yes | SMTP username (usually your full email address) |
| password | string | Yes | SMTP password |
| from | string | Yes | Sender email address |
| to | string | Yes | Recipient email address |
| subject | string | Yes | Email subject line |
| body | string | Yes | Email body (HTML supported) |
| reply_to | string | Optional | Reply-To email address |
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "server": "eagle.mxlogin.com", "username": "you@yourdomain.com", "password": "your_password", "from": "you@yourdomain.com", "to": "recipient@example.com", "reply_to": "replies@yourdomain.com", "subject": "Hello from the API", "body": "<h1>Test</h1><p>Sent via MXroute SMTP API.</p>" }' \ https://yourdomain.com/index.php
Success
{
"success": true,
"message": "Email sent successfully."
}
Error
{
"success": false,
"message": "Invalid server specified."
}
To find your MXroute SMTP credentials:
For detailed instructions, see the MXroute documentation.