使用短信通发短信
Posted nbu_djw
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用短信通发短信相关的知识,希望对你有一定的参考价值。
http://www.duanxin.cm/
class Program { static string url = "http://180.97.163.89:8012/OpenPlatform/OpenApi"; static void Main(string[] args) { var t = Task.Run(() => PostMessage()); t.Wait(); } public static async Task PostMessage() { var pairs = new List<KeyValuePair<string, string>> { new KeyValuePair<string, string>( "action", "sendOnce" ), new KeyValuePair<string, string>( "ac", "[email protected]" ), new KeyValuePair<string, string>( "authkey", "D5528AA2EEED774746754FF9CE36DA8D" ), new KeyValuePair<string, string>( "cgid", "6" ), new KeyValuePair<string, string> ( "c", "感谢您使用 爱考位 订单代报,您的订单号是:034421" ), new KeyValuePair<string, string> ( "m", "13429329134" ) }; var content = new FormUrlEncodedContent(pairs); using (var client = new HttpClient()) { var response = await client.PostAsync(url, content); string jsonMessage = await response.Content.ReadAsStringAsync(); } } }
以上是关于使用短信通发短信的主要内容,如果未能解决你的问题,请参考以下文章