SMTP API Documentation | Integrate Email Sending
Hand Emojji Images Your Success, Our Priority: Our team is here to assist you!
Developer Documentation

Send Mail API

Send email through SMTPProvider using a simple authenticated API endpoint.

POSTRequest method
1 endpointSend mail endpoint
multipart/form-dataRequest format
No matching documentation sections found.

Send email endpoint

URL: https://app.smtpprovider.com/api/send-mail/

Fields

FieldTypeDescriptionRequired
tostringEmail address of the recipient.Y
fromstringEmail address of the sender.Y
from_namestringName of the sender.Y
subjectstringSubject to send with the email.Y
bodystringHTML template of the email.Y
attachments[]FileAdd multiple rows with the same key for one or more attachments.N
tokenstringAPI token provided on the profile page.Y

PHP cURL example

PHP
$data = [
  'to' => 'test@example.com',
  'from' => 'info@example.com',
  'from_name' => 'test mail',
  'subject' => 'test mail subject',
  'body' => 'Dear Admin, I want to know some points',
  'token' => '***********************',
];
$curl = curl_init();
curl_setopt_array($curl, [
  CURLOPT_URL => 'https://app.smtpprovider.com/api/send-mail',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => $data,
]);
$response = curl_exec($curl);
if (curl_errno($curl)) echo 'Request Error:' . curl_error($curl);
curl_close($curl);
echo $response;

Responses

Success response

JSON
{
  "success": 1,
  "message_id": "mid-5739b9aa57df91a117476d030d38246c@akoneseo.com"
}

Error response

JSON
{
  "success": false,
  "data": { "message": "User Not Exist." }
}

Email Report

Method: GET

URL: https://app.smtpprovider.com/api/transaction-report

Returns paginated transactional email delivery records for the authenticated user. Results are ordered from newest to oldest.

Query Parameters

ParameterTypeDescriptionRequired
tokenstringAPI token provided on the profile page.Yes
from_datedateOptional start date/time filter.No
to_datedateOptional end date/time filter. A date-only value includes the complete day.No
pageintegerPage number. Minimum 1; default is 1.No
per_pageintegerRecords per page. Range 1–100; default is 100.No

PHP cURL Example

PHP

$query = http_build_query([
  'token' => 'API token provided on the profile page',
  'from_date' => '2026-01-01',
  'to_date' => '2026-01-31',
  'page' => 1,
  'per_page' => 100,
]);

$curl = curl_init("https://app.smtpprovider.com/api/transaction-report?$query");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($curl);
curl_close($curl);
echo $response;

Success Response

JSON
{
  "success": true,
  "data": {
    "current_page": 1,
    "per_page": 100,
    "total": 245,
    "last_page": 3,
    "from": 1,
    "to": 100,
    "has_more_pages": true,
    "data": [
      {
        "id": 12345,
        "time": "2026-01-31 12:30:00",
        "from_address": "info@example.com",
        "recipient": "user@example.com",
        "message_id": "message-id@example.com",
        "status": "send",
        "bounce_reason": null,
        "bounce_at": null,
        "bounce_cat": null
      }
    ]
  }
}

Error Responses

  • 422: Validation failed.
  • 403: Invalid API token.

PHP cURL example with attachments

PHP
$data = [
  'to' => 'test@example.com',
  'from' => 'info@example.com',
  'from_name' => 'test mail',
  'subject' => 'test mail subject',
  'body' => 'Dear Admin, I want to know some points',
  'attachments[]' => 'Attach file one',
  'attachments[]' => 'Attach file two',
  'token' => '***********************',
];
$curl = curl_init();
curl_setopt_array($curl, [
  CURLOPT_URL => 'https://app.smtpprovider.com/api/send-mail',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => $data,
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;

Bounce Report

Method: GET

URL: https://app.smtpprovider.com/api/bounce-report

Returns paginated bounced email records for the authenticated user. Results are ordered from newest to oldest.

Query Parameters

ParameterTypeDescriptionRequired
tokenstringAPI token provided on the profile page.Yes
from_datedateOptional start date/time filter.No
to_datedateOptional end date/time filter. A date-only value includes the complete day.No
pageintegerPage number. Minimum 1; default is 1.No
per_pageintegerRecords per page. Range 1–100; default is 100.No

PHP cURL Example

PHP
$query = http_build_query([
  'token' => 'API_TOKEN',
  'from_date' => '2026-01-01',
  'to_date' => '2026-01-31',
  'page' => 1,
  'per_page' => 100,
]);

$curl = curl_init("https://app.smtpprovider.com/api/bounce-report?$query");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($curl);
curl_close($curl);
echo $response;

Returned Record Fields

  • id, time, from_address, recipient, and message_id
  • status, bounce_reason, bounce_at, and bounce_cat

Response Pagination Fields

The response includes current_page, per_page, total, last_page, from, to, has_more_pages, and a data array.

Error Responses

  • 422: Validation failed.
  • 403: Invalid API token.