public void SendMultiMessage() { IAppConfig appConfig = new MessageConfig("appid", "appkey", SignType.sha1); MessageMultiXSend messageMultiSend = new MessageMultiXSend(appConfig); messageMultiSend.SetProject("w3nla3"); messageMultiSend.AddTag("we235"); Dictionary <string, string> vars1 = new Dictionary <string, string>(); vars1.Add("code", "33344"); vars1.Add("minue", "18"); messageMultiSend.SetMulti(new List <MultiMessageItem>() { new MultiMessageItem() { to = "17602115149", vars = vars1 }, new MultiMessageItem() { to = "13391155482", vars = vars1 } }); string returnMessage = string.Empty; messageMultiSend.MultiXSend(out returnMessage); Console.WriteLine(returnMessage); Console.ReadKey(); }
public void SendMultiMessage() { IAppConfig appConfig = new MessageConfig("10051", "d13ff6b6ab46bd713d1d5ce6a0a0b78a"); MessageMultiXSend messageMultiSend = new MessageMultiXSend(appConfig); messageMultiSend.SetProject("MApf82"); Dictionary <string, string> vars = new Dictionary <string, string>(); vars.Add("code", "a你好aaaa"); messageMultiSend.SetMulti(new List <MultiMessageItem>() { new MultiMessageItem() { to = "phoneNumberHere" }, new MultiMessageItem() { to = "13240372516", vars = vars } }); string returnMessage = string.Empty; if (messageMultiSend.MultiXSend(out returnMessage) == false) { Console.WriteLine(returnMessage); } }