**先决条件:网建短信通提供了短信发送API,进入 [http://www.smschinese.cn/api.shtml](http://www.smschinese.cn/api.shtml) 进行注册**
**其次,运用httpClient相关知识,调用其接口实现短信发送,代码片段如下:**
@SuppressWarnings({ "rawtypes", "unchecked" })
public int sendMsgUtf8(String Uid,String Key,String content,String mobiles){
Map maps = new HashMap();
maps.put("Uid", Uid);
maps.put("Key", Key);
maps.put("smsMob", mobiles);
maps.put("smsText", content);
String result = sendHttpPost("http://utf8.sms.webchinese.cn", maps, "utf-8");
return Integer.parseInt(result);
}
**短信内容可以随意编辑**