Code to send sms using j2ee application

Hi all,
this is shashi kant,
plz send me the code to sent a sms using j2ee applications.
or tell me the api these are used to  develop this kind of application.
thanks
my email id is---- [email protected]

I'm working on a project to send SMS from a MIDlet
to a servlet and back to the MIDlet through a
SMSC.can anybody send a sample code for me to get
help ?you should have a sms server .
your MIDlet send the parameters to the servlet (mobile phone, message, ..) and, after, the servlet send a request to the sms center and he send to the mobile number the message !
good luck

Similar Messages

  • How to send attachments using java application and outlook

    Hi ,
    I created an application in java which is as
    on the Conference Tab i can schedule a conference and with the send command on page it map all the scheduled data to outlook(with all conference details) and using outlook send option the mails are send to appropriate user.
    but now i want to modify this application such as when i use the send command from my jsp page it should attach the file that is in .vcs or .ics format for auto updation of user calender.
    can any one know how to send attachment using java application .

    Last time I checked, SMS was a service between carriers and doing SMS yourself was really tricky. Some services existed to let you do it but as I recall they wanted non-trivial money.
    However, most phone carriers provide an email-to-SMS bridge of some kind.
    So the easiest thing is just to send an email.
    That's sending from a non-phone to a phone. There's a J2ME library to send/receive SMS from/to a phone.
    However, this is from memory, and a little out of date, so I could be entirely wrong. Hope it helps anyway.

  • Want to send sms using java

    I am developing a stand alone application in java that contains sending sms to certain numbers.
    I want to send sms using java and my phone connected to my pc by usb cable(Not through Bluetooth).
    I am using Linux operating system (Arch linux).
    I tried a few libraries that uses the the online sms portals,but for some reasons i dont want to pay those sites.(just want it to be done using my simcard cause its economical).
    Help appreciated

    880667 wrote:
    I am developing a stand alone application in java that contains sending sms to certain numbers.
    I want to send sms using java and my phone connected to my pc by usb cable(Not through Bluetooth).
    I am using Linux operating system (Arch linux).
    I tried a few libraries that uses the the online sms portals,but for some reasons i dont want to pay those sites.(just want it to be done using my simcard cause its economical).
    Help appreciatede First thing you need to check: are you able to access other services my connecting you mobile by USB to machine (Line GPRS, calling). Because it requires the calling or SMS port access. And you said it is economical by sending SMS using mobile it depends. But most of the times, it is better to use the SMS service provider getway. They provide the details either http or FTP, we just need to put or message in the accepitng form, rest of the things are done by the service provide.

  • Send SMS from J2ME application to a mobile number...

    Hi guys,
    Need your help on sending SMS from J2ME application saved from mobile to send to another mobile number...
    I have tried the WMA demo from suns WTK it send message but the other number cannot received the message.
    Please help or give any idea or sample code that can guide
    me...
    Thanks in Advance...
    Regards,
    Psyeu

    WMADemo works fine.
    Try to do this:
    1. Open WMADemo
    2. Run WMA Console (File->Utilites->WMA Console)
    3. On the top of the window of WMA Console you will see the number of "Console's phone". If you don't have any started emulators, the number will be +5550000.
    4. Run WMADemo
    5. Select SMS Send in emulator menu.
    6. In destination address write +5550000
    7. Enter message
    8. Push "Send" command. Emulator asks you to send SMS. Push "OK" twise.
    9. Then you will see your message in WMA Console

  • How to send SMS from JSP application.

    Hi,
    I have created a web application using JSP for our Office internal use. I want to include the folowing option in our app.
    1) How to send SMS from the application to mobile.
    2) I don't want to use third party service (ex: SimpleWire). as the app is for internal purpose only.
    It will be helpful, if I get the complete procedure to implement it, as this is my first application.
    Thanks & Regards
    suresh.

    I am having problem with smslib. smslib is an enhanced version of jsmengine, I have compiled the program, there is no error but when I run it , the following error is found. Can you help? my email is [email protected]
    Exception in thread "main" java.lang.NoClassDefFoundError: CIncomingMessage (wrong name: org/smslib/CIn
    comingMessage)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

  • Sending SMS using PL/SQL

    hello friends..
    i want to send sms using pl/sql.. so i tried send_email procedure..
    but how to find Mobile Address:- to send email(sms) ?
    [email protected] - how to find domain name
    can any one help me..
    Thanks
    PROCEDURE SEND_EMAIL(pFmUser IN VARCHAR2,
    pToUser IN VARCHAR2,
    pSubject IN VARCHAR2 DEFAULT NULL,
    pBody IN VARCHAR2 DEFAULT NULL) IS
    SenderName VARCHAR2(50);
    SenderAddress Varchar2(200); -- := '<[email protected]>';
    vToReceivers varchar2(200);
    EmailServer varchar2(200); --:= 'smtp_server';
    ServerPort NUMBER:=25;
    UserName VARCHAR2(200);
    UserPass VARCHAR2(200);
    conn UTL_SMTP.CONNECTION;
    crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
    mesg VARCHAR2( 4000 );
    mesg_body varchar2(4000);
    vCount NUMBER:=0;
    vNextPos NUMBER:=0;
    vStr NUMBER:=0;
    vPos NUMBER;
    vChk NUMBER;
    pToList VARCHAR2(4000);
    BEGIN
    conn:= utl_smtp.open_connection( EmailServer, ServerPort);
    utl_smtp.ehlo(conn,EmailServer);
    --utl_smtp.helo( conn, EmailServer );
    utl_smtp.command( conn, 'AUTH LOGIN');
    utl_smtp.command( conn, utl_raw.cast_to_varchar2( utl_encode.base64_encode( utl_raw.cast_to_raw( UserName ))) );
    utl_smtp.command( conn, utl_raw.cast_to_varchar2( utl_encode.base64_encode( utl_raw.cast_to_raw( UserPass ))) );
    utl_smtp.mail( conn, SenderAddress);
    utl_smtp.rcpt( conn, pToList);
    mesg:=
    'Date: '||TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' )|| crlf ||
    'From: "'||SenderName||'" '||SenderAddress|| crlf ||
    'Subject: '||pSubject|| crlf ||
    'To: '||pToList|| crlf||
    pBody||crlf||crlf;
    utl_smtp.data( conn, mesg );
    utl_smtp.quit( conn );
    EXCEPTION
    WHEN OTHERS THEN RAISE_APPLICATION_ERROR(-20001,SQLERRM);
    END;

    user10502250 wrote:
    i want to send sms using pl/sql.. so i tried send_email procedure..
    but how to find Mobile Address:- to send email(sms) ?
    [email protected] - how to find domain name
    Exactly. You cannot simply send a SMS as an e-mail. The mail (SMTP) server needs to have a plug-in of sorts that enables it to forward a specially formatted e-mail it receives as an SMS.
    More then a decade ago, some cellular providers provided such mail servers - allowing you to specify the cellular number as either the recipient address or as the e-mail subject, with the body containing the actual SMS message.
    Due to this feature being abused and the cost of SMS transport being unrecoverable, this (as a public feature) has long since been discontinued by most, if not all, cellular network providers.
    So no, there is no magic domain(s) you can use to (spam) mobile numbers with SMS.
    If you want a SMS solution, you need to talk to a cellular provider about the products they have for 3rd party SMS integration.
    Alternatively, you need to use a dedicated cellphone, hooked up via USB/Bluetooth to a server, and use that as your SMS transport mechanism.

  • How to send sms from oracle application to cell phone

    Hi all
    please send me in how to send sms from oracle application to cell phone. Is there any way to solve this task. if so please suggest me.

    Please see old threads for similar discussion -- http://forums.oracle.com/forums/search.jspa?threadID=&q=SMS&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • I cannot send sms using TC65 modem

    I wrote test program to send sms. When program tryig to open conection(MessageConnection), he catches ConnectionNotFoundException (null):
    String url = "sms://+37256844491";
    MessageConnection mc = (MessageConnection)Connector.open(url);
    Does anybody can help me?

    I need to make communication via sms between phone and modem. It is not good if these sms messages will be stored in memory of a mobile phone or modem. For this i need to recieve and transmit these messages using current sms port, then i'll be able to intercept them and they will not be stored in memory of a mobile phone or modem.
    If modem supports this kind of sms sending - via GPRS connection. Why i cannot use wma classes, which give me the opportunity to send sms using their methods? It is something unreal.
    Maybe problem in configuration of GPRS connection. I know that this configuration is made by "AT^SJNET" command. Example: AT^SJNET="gprs","*99***1#","internet","","",30. These settings are used by "(MessageConnection)connector"
    I configured many others settings at the modem using AT commands, which are need to connect to the Internet via GPRS.
    Maybe i don't know some nuances.
    I tried to connect to the Internet via GPRS connection from my PC and i got this connection. I tried to connect using AT commands and i did not get it.
    If i told something wrong, please correct me.
    Edited by: _denisjuk on Nov 17, 2007 4:18 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Does any one have a sample code for sending email using IMAP ?

    Hi
    thank you for reading my post
    I have tried to use SMTP and because of some problems i could not use it and i must use Imap (authentication required)
    here is my SMTP code , does any one know how i can tune it to use Imap , or has a code snippet to send email using Imap ?
    thanks
    private static void postMail(String[] recipients, String subject, String message,
                             String from) throws MessagingException {
            boolean debug = false;
            class SMTPAuthenticator extends javax.mail.Authenticator
                    public PasswordAuthentication getPasswordAuthentication()
                        return new PasswordAuthentication(mail_usrname,mail_password);
            //Set the host smtp address
            Properties props = new Properties();
            FileInputStream fis;
            try {
                System.out.println("Loading property file");
                fis = new FileInputStream(new File("c:/email.properties"));
                props.load(fis);
                System.out.println("property file done");
            } catch (FileNotFoundException e) {
                System.out.println("file not found");
                e.printStackTrace();
            } catch (IOException e) {
                System.out.println("can not read properties file");
                e.printStackTrace();
            /*props.put("mail.smtp.user", mail_usrname);
    props.put("mail.smtp.host", smtpHost);
    props.put("mail.smtp.port", smtpPort);
    props.put("mail.smtp.starttls.enable","true");
    props.put("mail.smtp.socketFactory.port", smtpPort);
            // create some properties and get the default Session
            Authenticator auth = new SMTPAuthenticator();
            Session session = Session.getDefaultInstance(props, null);
            session.setDebug(debug);
            // create a message
            Message msg = new MimeMessage(session);
            // set the from and to address
            InternetAddress addressFrom = new InternetAddress(from);
            msg.setFrom(addressFrom);
            InternetAddress[] addressTo = new InternetAddress[recipients.length];
            for (int i = 0; i < recipients.length; i++) {
                addressTo[i] = new InternetAddress(recipients);
    msg.setRecipients(Message.RecipientType.TO, addressTo);
    // Setting the Subject and Content Type
    msg.setSubject(subject);
    msg.setContent(message, "text/HTML");
    System.out.println(msg.toString());
    Transport.send(msg);

    Please try this out!!!!!!!!!
    You can send emails using Outlook also. You can send email over Microsoft Exchange with this object (or another email server, using IMAP/POP).
    Sub SendMailOutlook(aTo, Subject, TextBody, aFrom)
    'Create an Outlook object
    Dim Outlook 'As New Outlook.Application
    Set Outlook = CreateObject("Outlook.Application")
    'Create e new message
    Dim Message 'As Outlook.MailItem
    Set Message = Outlook.CreateItem(olMailItem)
    With Message
    'You can display the message To debug And see state
    '.Display
    .Subject = Subject
    .Body = TextBody
    'Set destination email address
    .Recipients.Add (aTo)
    'Set sender address If specified.
    Const olOriginator = 0
    If Len(aFrom) > 0 Then .Recipients.Add(aFrom).Type = olOriginator
    'Send the message
    .Send
    End With
    End Sub

  • Error in sending mail Using java application using SMTP.

    Hi,
    I have created a java application of self user registration which also sends email to the user.
    I have also added two JAR files ie mail.jar and activation.jar under the PORTAL_INF/lib.
    The code works well in other servers but its showing the error-
    java.lang.NoSuchMethodError: com.sun.activation.registries.MailcapFile.getMailcapList(Ljava/lang/String;)Ljava/util/Map;
    Thanks & Regards,
    Amarys.

    Hi Amarys,
    Please check if you have configure the mail server in SAP protal.
    Refer to below documents:
    [Send email, using SMTP on remote host|Send email, using SMTP on remote host]
    [Mailing throw webdynpro for java|Mailing throw webdynpro for java]
    Best Regards
    Arun Jaiswal

  • Sending SMS using mobile phone connection.

    Hi all,
    I want to develop a feature to send SMS from my java application by using mobile phone.
    I am new to java.
    tell me how to connect the mobile phone from my applicatio and how do i send the SMS.
    Hoping your help sooner....
    Thanks and regards,
    Suresh Dhandauthapani.

    Hi junaid,
    Thanx for the response...One more doubt....Is it possible to send sms from pc to mobile directly using the sms server without the intervention of a service provider?If yes plzzz suggest me the steps to establish such a setup.
    Once Again..Thanx in Advance...
    R.PRASATH KRISH...
    Message was edited by:
    RPRASATHKRISH

  • Send SMS using CL_BCS fail

    Hi
    I have created a HTTP node in SCOT called SMS for sending SMS's to customers. In my program I use class CL_BCS to send the message. But the message is never sent. In SOST I see the error: Cannot process message, no route from <user> to <phone number>. I think the reason is that in SCOT (System Status) the messages are under PAG but not in my node 'SMS' as I expected but in W/o nodes. Any ideas why the message is not correct node?
    CODE:
      CALL METHOD CL_BCS=>CREATE_PERSISTENT
        RECEIVING
          RESULT = lr_sms.
      CALL METHOD CL_DOCUMENT_BCS=>CREATE_DOCUMENT
        EXPORTING
          I_TYPE        = 'RAW'
          I_SUBJECT     = 'TEST'
          I_TEXT        = lt_text
        RECEIVING
          RESULT        = lr_document.
      l_sms_num = i_mobile.
      CALL METHOD CL_CAM_ADDRESS_BCS=>CREATE_SMS_ADDRESS
        EXPORTING
          I_SERVICE = 'SMS'
          I_NUMBER  = l_sms_num
        RECEIVING
          RESULT    = lr_rec
      CALL METHOD lr_sms->ADD_RECIPIENT
        EXPORTING
          I_RECIPIENT = lr_rec
          I_EXPRESS   = 'X'.
      CALL METHOD lr_sms->SET_DOCUMENT
        EXPORTING
          I_DOCUMENT = lr_document.
      CALL METHOD lr_SMS->SEND
        RECEIVING
          RESULT = l_bool.
    I've made sure that settings in SA14 are maintained: Pager Service = SMS, USE = SMS Service

    thank you for looking into this thread,
    i have configured the in scot.
    currently sending all RAW type as TXT. this has resolved my issues.

  • Abap code to send sms

    Hai Everyone,
             I am developing a small leave application. as of now functionally everything is working perfectly. but as an added feature to this application I wanted to provide an option where employees could apply for leave by sending sms as well as the response from the team lead can be done using sms itself. so, please provide me some ideas on how to implement this.
    - Rozario
    Edited by: Halley Rozario on May 3, 2011 11:33 AM

    Hi,
    Sending an SMS from SAP is simple as there are many Vendors(some offer free service with restrictions on no. of chars etc) who expose Web Services which does this, you just need to consume this web service and invoke it within your program. There are many threads/blogs on SDN for this.
    However, receiving an SMS is different game altogether, you might need a GSM/3G modem(software) connected to a service provider etc or use a SMS gateway. There are many software which can do this for ex: Diafaan etc.
    Regards,
    Chen
    Edited by: Chen K V on May 3, 2011 3:21 PM

  • [Newbie] Can I send sms using J2ME WT ?

    Hi,
    i need to write a midlet (midp 1.0) able to send sms.
    (for Nokia midp1.0 phone)
    Using Wireless Toolkit can I do it?
    Or, as i think, i need anyway a midp 2.0 phone?
    Thanks for answer
    and sorry if this is an old answer
    Matteo

    thanks for answer.
    if i well understand, i cant add WMA package in my project to build an application that will work on phone not supporting wma ...i need that phone support s WMA in own hardware..
    and Nokia SMS API ?
    Can i use it on all j2me phone? Or i need that SMS Api are inside phone?
    is truth ?

  • Send SMS using AT command in LabWindows?

    I managed to call..using the ATD command but now I am having problems in sending a SMS message..
    In hyperterminal the commands are the following:
    AT+CMGF=1 \r
    AT+CMGW="0040766562692" \r
    The GSM / GPRS modem will then return a prompt "> " and you can start typing the SMS text message.
    >Have a nice day.
    When finished, press Ctrl+z of the keyboard.
    Here is what I tried to do...but nothing happens:
    int commandSendSMS()
          char bW1[100];
          Fmt(bW1,"%s","AT+CMGF=1\r");
       ComWrt(4, bW1, 10);
       Fmt(bW1,"%s","AT+CMGW=\"0040766562692\"\r");
       ComWrt(4, bW1, 25);
       Fmt(bW1,"%s","Have a nice day.\032" );  
       ComWrt(4, bW1, 18);
          return 0;
    I use \032 to replace <ctrl+z> is that correct?
    What am I doing wrong...please help!

    Ok, the situation seems to be a bit more clear now. Here what I would do, using GetInQLen and ComRd to test answers from the modem:
       char   bW1[64], msg[512];
       // Send first part of the commands
       strcpy (bW1, "AT+CMGF=1\r");
       ComWrt (4, bW1, strlen (bW1));
       Delay (0.1);
       strcpy (bW1, "AT+CMGW=\"0040766562692\"\r");
       ComWrt (4, bW1, strlen (bW1));
       Delay (0.1);
       // Test for answer from the modem
       ComRd (4, msg, GetInQLen (4));
       if (!strlen (msg) || strcmp (msg, "> ")) {
          MessagePopup ("Error", "No answer from the modem or incorrect answer!");
          goto Error;
       // Send SMS text to the modem
       strcpy (bW1, "Have a nice day.\032" );  
       ComWrt (4, bW1, strlen (bW1));
       Delay (0.1);
       // Test for answer from the modem
       ComRd (4, msg, GetInQLen (4));
       if (!strlen (msg) || strncmp (msg, "+CMGW", 5)) {
          MessagePopup ("Error", "No answer from the modem or incorrrect answer!");
          goto Error;
       // Find ref number and issue the command to actually send the message
       Scan (msg, "%s[dtzz]%d", &x);   // substitute 'zz' with ASCII code for ':'
       sprintf (bW1, "AT+CMSS=%d\r", x);
       ComWrt (4, bW1, strlen (bW1));
    I wrote this code from memory: please double check and complete it before running it.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

Maybe you are looking for

  • Cursor For loop question

    Hi, I have a cursor in my plsql and I am trying to get the record through a FOR loop. I know that for loop will take care of opening, fetching and closing the cursor implicitly. Ex. declare cursor c1 is select * from emp; begin for l_rec in c1 loop e

  • 2 CD Music Files in External Hard Drive

    I remember you told me how to file my iTunes music folder into my existing one in my external hard drive (EHD). When I slide the one from my PC directly over the iTunes Music File in my EHD it copies and updates everything fine. However, when I look

  • Need Chart of Account Sample

    Hi Every body, Could any one please send me a sample soft copy of Chart of accounts relating to a Construction Company. We are implemeting Oracle Financial now we are in a bigning stage. For the test purpose I need a sample copy of a chart of account

  • Monitor multi processor

    hey all.. how i can monitor each processor in my multi processor machine which have solaris 8 .. and if i create thread by using java language why i not see it in the prosess list by use PS command..

  • Download speed has dropped

    Hi, having some problems with my BB, the line and BB was cutting out so an engineer came and fixed a faulty extention stating that the BB was not back to the 6mbps that I'm used to. The cutouts have stopped but my download speed is very slow...can an