Skip to content

Instantly share code, notes, and snippets.

@EsendexDev
EsendexDev / composer.json
Last active February 17, 2021 16:29
Esendex PHP SDK composer.json
{
"require": {
"esendex/sdk": "3.0.*"
}
}
@EsendexDev
EsendexDev / Composer autoload.php
Created March 19, 2013 14:30
Esendex PHP SDK Composer autoload.php
require_once 'path/to/vendor/autoload.php';
@EsendexDev
EsendexDev / PEAR install commands
Created March 19, 2013 14:57
PEAR commands to install the Esendex PHP SDK
pear config-set auto_discover 1
pear install esendex.github.com/pear/Esendex
@EsendexDev
EsendexDev / PEAR autoload.php
Created March 19, 2013 14:58
PEAR autoload
require_once 'Esendex/autoload.php';
@EsendexDev
EsendexDev / Esendex PHP SDK autoload.php
Created March 19, 2013 15:03
Esendex PHP SDK PSR-0 autoloader
require_once 'path/to/downloaded/Esendex/autoload.php';
@EsendexDev
EsendexDev / CreateAndSendSMS.java
Last active December 20, 2015 03:09
How to create and send an SMS message with the Esendex Java SDK
//Create an SMS message request with phone number and message body
SmsMessageRequest msg = new SmsMessageRequest("447879000000", "my body text");
//Add optional fields to the message
msg.setBody("Test Message from SendMessageSample");
msg.setFrom("447879000000");
msg.setValidity(5);
//Create a collection to hold the single message to send from specified account
SmsMessageCollectionRequest req = new SmsMessageCollectionRequest("myAccountReference", msg);
@EsendexDev
EsendexDev / CreateAndSendSMS.cs
Last active March 4, 2021 13:40
Creating and Sending SMS messages using the Esendex .Net SDK - Full details here: http://developers.esendex.com/
var messagingService = new MessagingService("username", "password");
messagingService.SendMessage(new SmsMessage("07123456789", "Hello!", "accountRef"));
@EsendexDev
EsendexDev / GetInboxMessages.cs
Last active December 20, 2015 03:29
Getting Inbox messages using the Esendex .Net SDK - Full details here: http://developers.esendex.com/
const int pageNumber = 1;
const int pageSize = 20;
var credentials = new EsendexCredentials("Username", "Password");
var inboxService = new InboxService(credentials);
var messageBodyService = new MessageBodyService(credentials);
var receivedMessages = inboxService.GetMessages(pageNumber, pageSize);
@EsendexDev
EsendexDev / GetSentMessages.cs
Last active December 20, 2015 03:29
Getting sent messages using the Esendex .Net SDK - Full details here: http://developers.esendex.com/
const int pageNumber = 1;
const int pageSize = 20;
var sentService = new SentService(USERNAME, PASSWORD);
var sentMessages = sentService.GetMessages(pageNumber, pageSize);
@EsendexDev
EsendexDev / InstallEsendexGemFromCommandLine.sh
Created July 24, 2013 13:50
Installing the Esendex Ruby SDK RubyGem from the command line
gem install esendex