我正在使用代码来恢复密码。当用户请求重置密码时,它会向用户的手机发送短信。我的问题是它在运行时中间给了我这个输出。
=============================================== ================================
正在睡觉 - 点击进入终止。
但我想自动发送输入信号,以便自动终止作业。我可以这样做吗?
我的代码如下:
if (rs3.next()) {
String port = "COM3"; //Modem Port.
int bitRate = 460800; //this is also optional. leave as it is.
String modemName = "Huawei E165G"; //this is optional.
String modemPin = ""; //Pin code if any have assigned to the modem.
String SMSC = "+947100003"; //Message Center Number ex. Mobitel
GsmModem gsmModem = new GsmModem();
GsmModem.configModem(port, bitRate, modemName, modemPin, SMSC);
gsmModem.Sender(mobileno, "Your new password is "+rs3.getString("password")+" Please change your password in your next login. >>Fast Inventory<<"); // (tp, msg)
System.out.println("Code came here");
Statement s2=Db.connectDb().createStatement();
s2.executeUpdate("UPDATE user SET lockstatus='0' WHERE uid='"+username.getText()+"'");
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
我正在使用SMSlib。