0
how to send sms in particular mobile number using c# windows application?
which is best..?
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)
+ 3
Amazon price for sms
https://aws.amazon.com/pt/sns/sms-pricing/
0
thank u sirr



