Prolateral Consulting Ltd
Prolateral Consulting Ltd
Knowledgebase Articles
Setup examples

Prolateral offers primary and backup domain (DNS) services, with servers in key geographic locations providing the best service possible.


How do I send an email using the outMail API in PHP?
How do I send an email in PHP with a RESTful API?


The following example of code assumes you have already got a fully functional webserver and you have working knowledge of PHP and the cURL Libraries.

Example code outmail-send.php


 * outmail-send.php
 * This example we will send an email using the outMail API.

$url = '';

$data = array(
        "api_key"   => "YOUR_SECRET_API_KEY",
        "to"        => array("", ""),
        "sender"    => "",
        "subject"   => "Sending an email via Outmail API",
        "text_body" => "This is the text message body",
        "html_body" => "<body><h1>This is the message</h1></body>"

$data_string = json_encode($data);

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json', 'Content-Type: application/json'));
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_HEADER, true);

$result = curl_exec($ch);



Summary of server details

Outgoing server

As provided in your signup email.

Outgoing server protocol


Outgoing server port

25, 465, 587, 2525 or 8025

Authentication Type

Basic Authentication, SSL and TLS supported


As provided


As provided

like it, love it, then share it. Share this article on social media.

Did you enjoy this article?


The Origin of this information may be internal or external to Prolateral Consulting Ltd. Prolateral makes all reasonable efforts to verify this information. However, the information provided in this document is for your information only. Prolateral makes no explicit or implied claims to the validity of this information. Any trademarks referenced in this document are the property of their respective owners.