SMSCMD Code Sample download smscmd.zip

Window console smscmd syntax smscmd "text" "phone1,phone2,phone3" "email" "password"

 

VB Code Sample
¡@

'***** SendSMS function

Function sendsms(smstext As String, phone As String, email as String, password as String) As Variant
Dim pid As Variant
Dim sms As String

smstext=Mid(smstext, 1, 155) 'Maximum to 155 character

sms = """" & smstext & """ " & """" & phone & """ " & """" & email & """ " & """" & password & """"
pid = Shell("c:\smscmd\smscmd.exe " & sms, vbNormalFocus)
sendsms = pid

End Function

' ******Main Program to call sendsms function (change the green variable text below)

Dim Totext As String, Email as String, Password as String
Dim Tophone As String
Dim Retcode As Variant
¡@

Email = "mymail@gmail.com"   'your registered email in sms4mail.com
Password = "Mypassword"      'Your password in sms4mail.com.. Click here to register to get password
Totext = "Put your text here maximum to 155"    'Sample text
Tophone = "447123456789,85212345678"  'Mobile # is international format with country code
Retcode = sendsms(Totext, Tophone,Email,Password) 'execute fail if Retcode =0

¡@

  You can  and find lots of samples


JAVA Code Sample

Java Cod Sample1 - Just execute the smscmd.exe . No Catch the response

 

import java.io.IOException;

import java.io.InputStream;

 

public class ExecuteDOSCommand {

   public static void main(String[] args) {

      final String dosCommand = "cmd /c c:\\smscmd\\smscmd.exe";

      final String text = "YOUR SMS Message Here  ..........................";

      final String mobile = "YOUR mobile # here . It is international format with country code.......................";     

      final String email = "YOUR email Here  ..........................";

      final String password = "YOUR password Here  ..........................";

     try {

         final Process process = Runtime.getRuntime().exec(

            dosCommand + " " + text + " " + mobile + " " + email + " " + password);

           } catch (IOException e) {

         e.printStackTrace();

      }

   }

}

¡@

Java Cod Sample 2 - Catch the smscmd.exe response back

 

import java.io.IOException;

import java.io.InputStream;

 

public class ExecuteDOSCommand {

   public static void main(String[] args) {

      final String dosCommand = "cmd /c c:\\smscmd\\smscmd.exe";

      final String text = "YOUR SMS Message Here  ..........................";

      final String mobile = "YOUR mobile # here . It is international format with country code.......................";     

      final String email = "YOUR email Here  ..........................";

      final String password = "YOUR password Here  ..........................";

     try {

         final Process process = Runtime.getRuntime().exec(

          dosCommand + " " + text + " " + mobile + " " + email + " " + password);

         final InputStream in = process.getInputStream();

         int ch;

         while((ch = in.read()) != -1) {

            System.out.print((char)ch);

         }

      } catch (IOException e) {

         e.printStackTrace();

      }

   }

}

  You can  and find lots of samples


¡@

VC++ sample

#include "shellapi.h"

(OR  #include <windows.h> OR  #include <afxwin.h> (if use MFC))

Link...

shell32.lib

 VC ++ Code Sample

ShellExecute(NULL,"open","c:\\smscmd\\smscmd.exe",  "text mobile email password",NULL,SW_HIDE );

}

¡@

  You can  and find lots of samples


C# sample

Process.Start( "C:\\Windows\\system32\\cmd.exe", "/C C:\\smscmd\smscmd.exe  text mobile email password" );

}

  You can  and find lots of samples

¡@