0

how to send sms in particular mobile number using c# windows application?

which is best..?

12th Jan 2018, 1:18 PM
Sivaraj
Sivaraj - avatar
3 Réponses
+ 4
You can send using Amazon: Download nugget for AWSSDK for simple notification v3.3.5.12 or later use below simple method for sending single SMS. AmazonSimpleNotificationServiceClient smsClient = new AmazonSimpleNotificationServiceClient(my_access_key, my_secret_key, Amazon.RegionEndpoint.APSoutheast2); var smsAttributes = new Dictionary<string, MessageAttributeValue>(); MessageAttributeValue senderID = new MessageAttributeValue(); senderID.DataType = "String"; senderID.StringValue = "mySenderId"; MessageAttributeValue sMSType = new MessageAttributeValue(); sMSType.DataType = "String"; sMSType.StringValue = "Transactional"; MessageAttributeValue maxPrice = new MessageAttributeValue(); maxPrice.DataType = "Number"; maxPrice.StringValue = "0.5"; CancellationTokenSource source = new CancellationTokenSource(); CancellationToken token = source.Token; smsAttributes.Add("AWS.SNS.SMS.SenderID", senderID); smsAttributes.Add("AWS.SNS.SMS.SMSType", sMSType); smsAttributes.Add("AWS.SNS.SMS.MaxPrice", maxPrice); PublishRequest publishRequest = new PublishRequest(); publishRequest.Message = "This is 2nd sample message"; publishRequest.MessageAttributes = smsAttributes; publishRequest.PhoneNumber = "received phone no with + and country code"; Task<PublishResponse> result = smsClient.PublishAsync(publishRequest, token)
12th Jan 2018, 9:12 PM
Vinicius Souza
Vinicius Souza - avatar
12th Jan 2018, 9:13 PM
Vinicius Souza
Vinicius Souza - avatar
0
thank u sirr
14th Jan 2018, 10:24 AM
Sivaraj
Sivaraj - avatar