require_once dirname(__FILE__) . "/bulksms/BulkSMS.php"; // Defaults $USERNAME = "******"; $PASSWORD = "******"; $recipient = "61000000000"; $bulksms = new Blender\Client\BulkSMS(); // Login $bulksms->login($USERNAME, $PASSWORD); # Get Route ID $ROUTE_ID = $bulksms->getRouteIdByCountry("Australia"); // EXAMPLE 1 - Send to single recipient # Uncomment to run // $bulksms->singleRecipient("test", $recipient, "hello <asaf !!esting " . date("H:i:s"), $ROUTE_ID, "reference"); # ---------------------------------------------------------------------------------------------------------------- // EXAMPLE 2 - Send same message to batch $batch = new Blender\Client\BatchMessageSingleBody(); $batch->setOriginator("test"); $batch->setRouteId($ROUTE_ID); $batch->setBody("Batch single <message> in 漢語"); $batch->addMSISDN($recipient); // You can add as many as you like. # Dont filter duplicates - will send two messages to same recipient // $batch->addMSISDN($recipient); // $batch->setFilterDuplicaets(false); # Send to Mailing List // $batch->addMailingList("Mailing-List-Id"); # Send to Contact // $batch->addContact("contact-id") # Do not filter optouts // $batch->setFilterOptouts(false); # Uncomment to run
require_once dirname(__FILE__) . "/../bulksms/BulkSMS.php"; // Defaults $USERNAME = "******"; $PASSWORD = "******"; $recipient = "61000000000"; $bulksms = new Blender\Client\BulkSMS(); // Login $bulksms->login($USERNAME, $PASSWORD); # Get Route ID $ROUTE_ID = $bulksms->getRouteIdByCountry("Australia"); // EXAMPLE 1 - Send to single recipient # Uncomment to run // $bulksms->singleRecipient("test", $recipient, "hello <asaf !!esting " . date("H:i:s"), $ROUTE_ID, "reference"); # ---------------------------------------------------------------------------------------------------------------- // EXAMPLE 2 - Send same message to batch $batch = new Blender\Client\BatchMessageSingleBody(); $batch->setOriginator("test"); $batch->setRouteId($ROUTE_ID); $batch->setBody("Batch single <message> in 漢語"); $batch->addMSISDN($recipient); // You can add as many as you like. # Schedule message for sending later $batch->setSchedule("2017-01-01T15:24:04", "Australia/Melbourne"); # Dont filter duplicates - will send two messages to same recipient // $batch->addMSISDN($recipient); // $batch->setFilterDuplicaets(false); # Send to Mailing List // $batch->addMailingList("Mailing-List-Id"); # Send to Contact // $batch->addContact("contact-id") # Do not filter optouts