NisHera
8 years agoValued Contributor
sms test results
Anybody out there who tried texting test results?
before accessing mail would like to get sms
sharing any suggestions, experience or knowledge is appreciated.
Anybody out there who tried texting test results?
before accessing mail would like to get sms
sharing any suggestions, experience or knowledge is appreciated.
Hi NisHera,
Some mobile carriers support email-to-SMS, so that you can send an email to <phone_number>@domain.com and the recipient will get an SMS. Check with your carrier to see if it supports this.
Otherwise you'll need an SMS gateway service, such as Twilio (paid service). Twilio provides an API to send messages from code:
var accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; var authToken = "your_auth_token"; var url = "https://api.twilio.com/2010-04-01/Accounts/" + accountSid + "/Messages"; var message = "To=+15555555555&From=+16666666666&Body=Hello World"; var req = aqHttp.CreatePostRequest(url, accountSid, authToken); req.SetHeader("Content-Type", "application/x-www-form-urlencoded"); var response = req.Send(message);
if (response.StatusCode == 200)
{
Log.Message("message was sent")
}
else
{
Log.Message("Error from API: status " + response.StatusCode, response.Text);
}