This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'esendex' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Esendex.configure do |config| | |
config.username = "<username>" | |
config.password = "<password>" | |
config.account_reference = "<account_reference>" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
account = Account.new | |
batch_id = account.send_message( to: "07777111222", body: "Saying hello to the world with the help of Esendex") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
batch_id = account.send_messages([Message.new("07777111222", "Hello"), Message.new("07777111333", "Hi")]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int pageNumber = 1; | |
const int pageSize = 20; | |
var credentials = new EsendexCredentials(USERNAME, PASSWORD); | |
var sentService = new SentService(credentials); | |
var messageBodyService = new MessageBodyService(credentials); | |
var sentMessages = sentService.GetMessages(pageNumber, pageSize); | |
foreach (var message in sentMessages.Messages) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$message = new \Esendex\Model\DispatchMessage( | |
"WebApp", // Send from | |
"01234567890", // Send to any valid number | |
"My Web App is SMS enabled!", | |
\Esendex\Model\Message::SmsType | |
); | |
$authentication = new \Esendex\Authentication\LoginAuthentication( | |
"EX000000", // Your Esendex Account Reference | |
"[email protected]", // Your login email address | |
"password" // Your password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$authentication = new \Esendex\Authentication\LoginAuthentication( | |
"EX000000", // Your Esendex Account Reference | |
"[email protected]", // Your login email address | |
"password" // Your password | |
); | |
$service = new \Esendex\InboxService($authentication); | |
$result = $service->latest(); | |
print "Total Inbox Messages: {$result->totalCount()}"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$authentication = new \Esendex\Authentication\LoginAuthentication( | |
"EX000000", // Your Esendex account reference | |
"[email protected]", // Your login email | |
"password" // Your password | |
); | |
$headerService = new \Esendex\MessageHeaderService($authentication); | |
$message = $headerService->message("messageId"); | |
print_r($message->status()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$messageId = "unique-id-of-message"; | |
$authentication = new \Esendex\Authentication\LoginAuthentication( | |
"EX000000", // Your Esendex Account Reference | |
"[email protected]", // Your login email address | |
"password" // Your password | |
); | |
$service = new \Esendex\MessageBodyService($authentication); | |
$result = $service->getMessageBodyById($messageId); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php phing-latest.phar |