Textit.biz Serving Sri Lanka since 2011.
function sendSms() {
var id = "Textit.biz USER ID"; // Replace with your TextIt.biz User ID
var password ="Textit.biz PASSWORD" // Replace with your TextIt.biz Password
var phoneNumber = "0772823050"; // Replace with the recipient's phone number
var message = "Hello, this is a test SMS from Google Apps Script!";
var url = "https://textit.biz/sendmsg/index.php";
var payload = {
id: id,
pw: password,
to:phoneNumber,
text: message
};
var options = {
method: "post",
payload: payload
};
try {
var response = UrlFetchApp.fetch(url, options);
Logger.log(response.getContentText());
} catch (e) {
Logger.log("Error sending SMS: " + e.toString());
}
}