Search code examples
javaweb-applicationssmssms-gateway

send sms in java


I got a java class which is used to send SMS to a mobile by java web application. But I am not getting following terms, how can i get these?

      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 = "[email protected]";
      String to = "[email protected]";
      String body = "Hello SMS World!";

Full sorce code: How to send SMS using Java


Solution

  • You are referring to the code that is just a sending an e-mail using java program.Not sending sms using 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 = "[email protected]";
    String to = "[email protected]";
    String body = "This is the actual message content";
    

    All these information are required while sending an e-mail using java, not to send SMS.In order to send a sms, you need to configure SMS gateways.