0845 356 5758
or

Receive SMS

EsendexInboxService

The parameters for the EsendexInboxService constructor include optional arguments for a security certificate:

EsendexInboxService( $username, $password, $accountReference, $isSecure = false, $certificate = '' )

To send via HTTPS, use the following arguements:

$isSecure = true
$certificate = "PATH TO CERTIFICATE FILE" ( e.g. C:\Windows\curl_ca_bundle.crt ).

To send via HTTP these arguments can be ignored.

GetMessages

The EsendexInboxService.php class allows you to retrieve your inbox messages in two ways. The GetMessages method can be used to retrieve small inboxes, the maximum number of messages that will be returned with this method is 100.

GetLatestMessages

Inboxes holding more than 100 messages should use the GetLatestMessages method. This method takes two parameters, LastMessageID (this is the message IndexID) and MaxMessages. If LastMessageID is blank the latest number of messages (defined by MaxMessages), will be returned. Specify an IndexID to retrieve the messages that were received after it. MaxMessages is simply the Maximum number of messages to retrieve. This method allows you to retrieve your inbox messages in batches (an ideal batch size is around 50), which is more efficient than trying to recieve them all at once.

For a successful request, results are in the format:

Result=OK Messages=value where Messages value is an array containing message arrays in the format: [ID] - identifier assigned to the message by Esendex.
[Originator] - mobile number of the message sender.
[Recipient] - recipient of the message.
[Body] - message content.
[RecievedAt] - time Esendex took delivery of the message.
[Type] - type contained in the body: Text, Binary, SmartMessage or Unicode.
[IndexID] - identifier for the message correlating to the date/time of the inbound message.
For an unsuccessful request, results are in the format: Result=Error Message=value where Message value is a URL encoded description of the error.