// 使用web短信平台发送短信
首先创建一个messgee.properties 文件,
文件内部写入用户名和密码
比如:
#短信平台的账号和密码
cdkey=3ADK-YUH-0130-LGXQO
password=945681
编写发送短信类
@Override
public void sendMsg(String content, String phones) throws Exception {
try {
if(phones == null || "".equals(phones) || "null".equals(phones) || content == null || "".equals(content) || "null".equals(content))
return;
ResourceBundle bundle=PropertyResourceBundle.getBundle("message");
String cdkey=bundle.getString("cdkey");
String password=bundle.getString("password");
content = URLEncoder.encode(content, "utf-8");
String urlstr = "