1 2 3 Previous Next 39 Replies Latest reply: Aug 30, 2012 12:18 AM by 958726 RSS

    Send Message From Oracle To Mobile Device

    398653
      Hello All!

      There is a Way to send Message From Oracle Database Server to Mobile Device.

      One Way is to Send Email using Oracle SMTP Package - [UTL_SMTP].

      Mostly Cellular Service Providers give the Facility to their users to Recieve Email on Post-Paid Connections.
      {Mobile_No@Service_Provider_Domain.com} is the E-Mail Address for Post-Paid Connection Holder.
      e.g. +923003338669@mobilinkgsm.com.

      In this Way, Install/Configure Oracle Database 8.x/9.x/10.x and Create a Package.

      http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/maildemo_sql.txt
                   
      BEGIN
      demo_mail.mail(
                        sender     => 'Me <me@some-company.com>',
                    recipients => 'Someone <Mobile_No@Celluler_Service_Provider_Domain.com>' ,
                    subject    => 'SMS From Oracle Database Server',
                    message    => 'Hi! This is a test Message.');
      END;
      Second Way is to Send SMS Using GSM Modem/Mobile Phone & its Supporting Software/Utility.
      There are many software/utilities/Tools which can do this, but here i am using a free project.
      In this Way, Install/Configure:
                    * Red Hat Linux Operating System
                    * Oracle Database 8i/9.x/10.x
                    * Gnokii - For Nokia Mobile Phone
                              
                               Download    : http://gnokii.org/download/gnokii/0.6.x/gnokii-0.6.2.tar.gz
                               Install     : http://urtica.linuxnews.pl/~pkot/gnokii/gnokii.html#ch1
                               Sample File : http://cvs.savannah.nongnu.org/viewcvs/gnokii/gnokii/Docs/sample/gnokiirc?rev=1.22
                               User Guide  : http://wiki.gnokii.org/index.php/User%27s_Guide

                    * Nokia Mobile Phone With Data Cable - [http://www.gnokii.org/cables.shtml]
      Try to Send SMS Using the Command.

      Waseem$ echo "This is a test SMS using Gnokii-Linux..." | gnokii --sendsms +923003338669

      Note : Message Length = 160 Characters.

      It Will Take 30 - 40 Seconds and will send the SMS to the desired Number.

      To Test & Configure it in Oracle Database, you have to Create a Java Class.

      http://www.oracle-base.com/articles/8i/ShellCommandsFromPLSQL.php
              SET SERVEROUTPUT ON SIZE 1000000
           CALL DBMS_JAVA.SET_OUTPUT(1000000);
                
           BEGIN
                Host_Command (p_command => 'echo "This is a test SMS from Oracle Database." | gnokii --sendsms +923003338669');
           END;
           /
      I have tried it on Nokia 6030 and its Working.

      Best Regards
      Muhammad Waseem Haroon
      waseemharoon@gmail.com
      mwaseem_haroon@yahoo.com
      ocp_Waseem@hotmail.com
        • 1. Re: Send Message From Oracle To Mobile Device
          509983
          Thanks Muhammad Waseem Haroon,

          I Appreciate your Post. I have studied the material / links provided by you and follwed the steps and successfully implemented it using Nokia 3120.
          Using Nokia 3120 its taking only 8 to 10 seconds per SMS.

          I think, It will be beneficial for all of us to share the experience regarding this Post.

          Thanks.
          Ali Samad Khan
          • 2. Re: Send Message From Oracle To Mobile Device
            507897
            This is a nice post and I will definitely try this out. Very nice topic I must say.
            • 3. Re: Send Message From Oracle To Mobile Device
              530699
              Hi,

              good stuff

              anything for MS Windows?
              • 4. Re: Send Message From Oracle To Mobile Device
                575142
                plz
                i floww all steps but give
                error
                (
                SQL> /
                Process err :'gnokii' is not recognized as an internal or external command,
                Process err :operable program or batch file.

                PL/SQL procedure successfully completed.)

                what is solution???????????
                • 5. Re: Send Message From Oracle To Mobile Device
                  Satyaki_De
                  Good post. But, will it work in Windows?

                  Regards.

                  Satyaki De.
                  • 6. Re: Send Message From Oracle To Mobile Device
                    554938
                    gr8 work man!!! keep it up
                    • 7. Re: Send Message From Oracle To Mobile Device
                      398653
                      Gnokii can only run for Linux OS as it is defined on Gnokii's website.

                      You can suppose that Gnokii is an Example and Just Install a software which must be executed by the script for Mobile SMS on any windows or any OS but make sure that the software which you have installed on server side, must be able to be executed by the script then you can implement my above mentioned steps by removing Gnokii commands.

                      The Java Class & PL/SQL-API which I have recomended named "host" & "host_command" is not only for Linux based Oracle Database Servers, it can be used for Wondows Based Oracle Database Server which I thing is doing a main role.

                      As you Know, that once the Procedure will be executed successfully on any OS based oracle database server with any SMS Utility, you can execute it on any client as well. It does not matter that whatever the OS is installed there.

                      Thanks & Regards,
                      Muhammad Waseem Haroon
                      m.waseem@emirates.com

                      Message was edited by:
                      Waseem Haroon
                      • 8. Re: Send Message From Oracle To Mobile Device
                        398653
                        One of my friend told me about

                        OZEKI - http://www.ozeki.hu

                        But I hav'nt tried to send SMS using OZEKI.

                        Regards,
                        Muhammad Waseem Haroon
                        m.waseem@emirates.com
                        • 9. Re: Send Message From Oracle To Mobile Device
                          57043
                          Hi,

                          I had tried to send SMS message from database to hutch india phone, using demo_mail, but it is not working.

                          BEGIN
                          demo_mail.mail( sender => 'emailer@mailing.com',
                          recipients => '+0982044XXXX@hutch.co.in' ,
                          subject => 'SMS From Oracle Database Server',
                          message => 'Hi! This is a test Message.');
                          END;
                          /
                          Kindly tell me where I am going wrong.

                          thanks & regards
                          paragjp
                          • 10. Re: Send Message From Oracle To Mobile Device
                            Satyaki_De
                            Thanks for your reply. I've tried the first script provided by you. So far it is showing some transient SMTP error. I'm looking into this. And, thanks for sharing further knowledge with us.

                            Regards.

                            Satyaki De.
                            • 11. Re: Send Message From Oracle To Mobile Device
                              Satyaki_De
                              I've a following error message - how to resolve this? Any idea?
                              ERROR at line 1:
                              ORA-29278: SMTP transient error: 421 Service not available
                              ORA-06512: at "SYS.UTL_SMTP", line 17
                              ORA-06512: at "SYS.UTL_SMTP", line 96
                              ORA-06512: at "SYS.UTL_SMTP", line 138
                              ORA-06512: at "ODSUSER1.DEMO_MAIL", line 205
                              ORA-06512: at "ODSUSER1.DEMO_MAIL", line 99
                              ORA-06512: at "ODSUSER1.DEMO_MAIL", line 86
                              ORA-06512: at line 2
                              Regards.

                              Satyaki De.
                              • 12. Re: Send Message From Oracle To Mobile Device
                                398653
                                Hi,

                                ............
                                .....
                                00000
                                BEGIN
                                demo_mail.mail( sender =>
                                'emailer@mailing.com',
                                recipients =>
                                '+0982044XXXX@hutch.co.in' ,
                                subject => 'SMS From
                                Oracle Database Server',
                                message => 'Hi! This is
                                a test Message.');
                                END;
                                /
                                ....
                                ....
                                ..
                                If you are trying to send SMS using my 1st option (Using Oracle SMTP Package) then..... first try to send SMS from "hotmail / yahoo / Gmail / Free Account / Any Email account" to your mobile '+0982044XXXX@hutch.co.in', if it is working from there then I am 100% sure that your procedure will run perfectly.

                                Normaly, Mobile Service Provider does not allow users to send email to mobile phone. I don't Know "hutch" is allowing or not. you have to check it with them.
                                • 13. Re: Send Message From Oracle To Mobile Device
                                  398653
                                  SMTP Server is required to use UTL_SMTP or Demo_Mail Package. If it is available to you then CUSTOMIZE your Demo_Mail Package Specification.
                                  CREATE OR REPLACE PACKAGE demo_mail IS
                                    
                                    ----------------------- Customizable Section -----------------------
                                    
                                    -- Customize the SMTP host, port and your domain name below.
                                    smtp_host   VARCHAR2(256) := 'smtp-server.some-company.com';
                                    smtp_port   PLS_INTEGER   := 25;
                                    smtp_domain VARCHAR2(256) := 'some-company.com';
                                  .. .....
                                  ..   ..
                                  ... ....
                                  ...  ....
                                  You can use Microsoft Exchange Server, MDaemon and many more SMTP Software Packages for that......... also there are free SMTP Software Packages are available on "Free Downlolad Websites" which you can download.
                                  • 14. Re: Send Message From Oracle To Mobile Device
                                    NicloeiW
                                    Hi,

                                    I also receive the same error message as Satya
                                    ERROR at line 1:
                                    ORA-29278: SMTP transient error: 421 Service not available
                                    ORA-06512: at "SYS.UTL_SMTP", line 17
                                    ORA-06512: at "SYS.UTL_SMTP", line 96
                                    ORA-06512: at "SYS.UTL_SMTP", line 138
                                    ORA-06512: at "ODSUSER1.DEMO_MAIL", line 205
                                    ORA-06512: at "ODSUSER1.DEMO_MAIL", line 99
                                    ORA-06512: at "ODSUSER1.DEMO_MAIL", line 86
                                    ORA-06512: at line 2
                                     
                                    could you give us one actual example i really cant understand this,

                                    if i send mail from hotmail then what should be host name, doman name, port etc
                                    1 2 3 Previous Next