mnakos icon

.net library για αποστολή SMS (VB code)

mnakos | PRO | 01/31/17 10:24:54 AM UTC | 0 ⭐ | 383 👁️ | Never ⏰ | []
VB.NET |

880 B

|

None

|

0 👍

/

0 👎

Imports Terracom.Liveall.ConnectorLib
 
Module Module1
    Sub Main()
        Dim sms_connector As New Connector()
        Dim res As Models.OP_RESULT
        Dim submit_info(1) As Models.HttpApiJSMSParts
        Dim si As New Models.HttpApiJSMSParts
 
        si.destination = "306912345678"
        si.message = "Test message - English. Δοκιμαστικό μήνυμα (Ελληνικά)"
        submit_info(0) = si
 
        sms_connector.Init("MY_VERY_SECRET_TOKEN", "mySenderID")
        res = sms_connector.SendSms(submit_info, 0)
        If res.ErrorCode <> SMS_SERVICE_ERROR_CODES.NO_ERROR Then
            Console.WriteLine("Problem sending SMS. Error message: {0}", res.ErrorMessage)
        Else
            Console.WriteLine("SMS sent sucessfully! SMSId for 1st sent message: {0}", res.SubmitInfo.FirstOrDefault().smsid)
        End If
 
    End Sub
 
End Module

Comments