All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zhenzi.sms.Test Maven / Gradle / Ivy

package com.zhenzi.sms;

import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;

public class Test {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		ZhenziSmsClient client = new ZhenziSmsClient("https://sms.zhenzikj.com", "你的appId", "你的appSecret");//https://sms_developer.zhenzikj.com
	    try {
	    	Map params = new HashMap();
	        params.put("number", "15811111111");
	        params.put("templateId", "0");
	        String[] templateParams = new String[2];
	        templateParams[0] = "3421";
	        templateParams[1] = "5分钟";
	        params.put("templateParams", templateParams);
//	        params.put("clientIp", "792.168.2.222");
	    	String result = client.send(params);
	    	System.out.print(result);
	    	
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy