我有一个java类,用于通过java web应用程序向手机发送短信。但我没有收到以下条款,我怎样才能得到这些条款?
String username = "MySMSUsername";// how to know MySMSUsername?
String password = "MyPassword";//how to know password?
String smtphost = "MySMSHost.com";//how to know SMSHost?
String compression = "My SMS Compression Information";
String from = "mySMSUsername@MySMSHost.com";
String to = "PhoneNumberToText@sms.MySMSHost.com";
String body = "Hello SMS World!";
最佳答案
您指的代码只是使用java程序发送电子邮件。而不是使用java发送短信。
String username = "saroj"; for example
String password = "saroj123";
String smtphost = "your e-mail server host name"; you can IP address of the mail server
String compression = "this is the subject of your e-mail";
String from = "saroj@saroj.com";
String to = "yourfreind@abc.com";
String body = "This is the actual message content";
使用java发送电子邮件时需要所有这些信息,而不是发送短信。为了发送短信,您需要配置短信网关。
关于java - 用java发送短信,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10070671/