MXroute SMTP API

Send email through MXroute SMTP servers via a simple JSON API.

Endpoint

POST /index.php

Send a JSON payload with Content-Type: application/json.

Parameters

FieldTypeRequiredDescription
serverstringYesMXroute SMTP hostname (must be an allowed server)
usernamestringYesSMTP username (usually your full email address)
passwordstringYesSMTP password
fromstringYesSender email address
tostringYesRecipient email address
subjectstringYesEmail subject line
bodystringYesEmail body (HTML supported)
reply_tostringOptionalReply-To email address

Example Request

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

Responses

Success

{
  "success": true,
  "message": "Email sent successfully."
}

Error

{
  "success": false,
  "message": "Invalid server specified."
}

Getting SMTP Credentials

To find your MXroute SMTP credentials:

  1. Log in at management.mxroute.com
  2. Click "Login to Panel" to access your control panel
  3. Find the SMTP server name on the "Email Clients" page

For detailed instructions, see the MXroute documentation.