first commit

This commit is contained in:
Ray
2026-02-19 03:37:37 +08:00
commit ccfd8c79a4
2813 changed files with 453657 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
package smsmoduyun.v1;
import smsmoduyun.v1.yun.SmsSingleSender;
import smsmoduyun.v1.yun.SmsSingleSenderResult;
/**
* 发送短信
*/
public class SmsSDKDemoV1 {
public static void main(String[] args) {
try {
// 请根据实际 accesskey 和 secretkey 进行开发,以下只作为演示 sdk 使用
// 请根据实际 accesskey 和 secretkey 进行开发,以下只作为演示 sdk 使用
String accesskey = "xxx";
String secretkey = "xxxxx";
// 手机号码
String phoneNumber = "xxxxxxx";
int type = 0;
// 初始化单发
SmsSingleSender singleSender = new SmsSingleSender(accesskey, secretkey);
SmsSingleSenderResult singleSenderResult;
String rangdom = "xxxxxxxxxx"; // 你的随机数
String msg = "【xxx】680956是您的验证码2分钟内有效。请勿向任何人泄露您收到的验证码";
int a = 0;
// 普通单发,注意前面必须为【】符号包含,置于头或者尾部。
singleSenderResult = singleSender.send(type, "86", phoneNumber, msg, "", "");
System.out.println(singleSenderResult);
} catch (Exception e) {
e.printStackTrace();
}
}
}