Example #1
0
}
$endpoints = new ServiceEndpoints();
if (!isset($submit)) {
    $senderAddress = "tel:+123456789";
    $address0 = "tel:+13500000991";
    $address1 = "tel:+13500000992";
    $message = "Hello World!";
    $clientCorrelator = "123456";
    $notifyURL = "http://application.example.com/notifications/DeliveryInfoNotification";
    $senderName = "ACME Inc.";
    $callbackData = "callback-data-goes-here";
    $username = "******";
    $password = "******";
    $endpoint = $endpoints->getSendMMSEndpoint();
} else {
    $endpoints->setSendMMSEndpoint($endpoint);
    $sender = new MMSSend($endpoints, $username, $password);
    $address = array();
    $address[0] = $address0;
    $address[1] = $address1;
    $address[2] = $address2;
    $address[3] = $address3;
    $address[4] = $address4;
    $attachments = array();
    error_log('Putting attachments into array: ' . print_r($_FILES, true));
    if (isset($_FILES) && is_array($_FILES)) {
        if (isset($_FILES['attachment0'])) {
            $attachments[0] = $_FILES['attachment0'];
        }
        if (isset($_FILES['attachment1'])) {
            $attachments[1] = $_FILES['attachment1'];