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.

Similar Messages

  • 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.

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Sending email using PL/SQL based on a query result

    Hello all,
    I want to create a procedure using PL/SQL, based on a query result.Here is the scenario:
    I have multiple tables in Target and Source databases that I want to compare(not the whole table but queries on these tables) and if they differ, I want to shoot an email. I have some ideas how to implement this but not sure whether it is the best approach.
    select Acct_id, total from SourceTableA
    minus
    select Acct_id, total from TargetTableA
    select Acct_id, sum from SourceTableB
    minus
    select Acct_id, sum from TargetTableB
    If the result of any of above queries > 0 then I want to shoot an email and want to repeat this procedure in the morning every day.
    I know how to implement send_mail procedure using UTL_SMTP package and how to schedule tha job by dbms_job package. But I am not sure how to implement the result of minus query. In case if minus > 0 then I also want to send the name of tables in the email message where source and target tables are not same. Should i use cursor, variable or insert the result in a new table? any help would be highly appreciated. Thanks in advance.
    Khan

    Actually these queries are the part of our daily testing that we run everyday manually(after the scheduled ETL load) to see if there are any discrepencies between our datawarehouse tables and source tables. So instead of running these queries manually everyday we want to schedula a procedure that will shoot an email in case of any discrepency and indicate which tables have problems.

  • How to send email using pl/sql containing the result set as the msg body

    Hi.. im using Pl/SQL code to send emails to the users from a dataset that is obtained in a databse table. i have used utl_smtp commands to establish the connection with the smtp mail server. im stuck at the logic when i have to include the message body which is actually the result set of a table.. For instance
    IF (p_message = 0) THEN
    UTL_SMTP.write_data(l_mail_conn, 'There is no mismatch between the codes' || UTL_TCP.crlf);
    ELSE
    UTL_SMTP.write_data(l_mail_conn, 'The missing codes are ' || UTL_TCP.crlf);
    for s in (select * from temp)
    loop
    UTL_SMTP.write_data(l_mail_conn, ' ' ||s || UTL_TCP.crlf);
    end loop;
    END IF;
    UTL_SMTP.close_data(l_mail_conn);
    UTL_SMTP.quit(l_mail_conn);
    END;
    ***p_message is a prameter passed to this procedure..
    Can i obtain the result in the form i have it in my table. which has three columns. I want to display the three columns as it is with teh records. ?

    this is not related about this forum but you can use below,
    CREATE OR REPLACE PROCEDURE SEND_MAIL (subject varchar2,mail_from varchar2, mail_to varchar2,mail_msg varchar2)
    IS
    mail_host varchar2(30):='XXXXX';
    mail_conn utl_smtp.connection;
    tz_offset number:=0;
    str varchar2(32000);
    BEGIN
    begin
    select to_number(replace(dbtimezone,':00'))/24 into tz_offset from dual;
    exception
    when others then
    null;
    end;
    mail_conn:=utl_smtp.open_connection(mail_host, 25);
    utl_smtp.helo(mail_conn,mail_host);
    utl_smtp.mail(mail_conn,'[email protected]');
    utl_smtp.rcpt(mail_conn,mail_to);
    utl_smtp.open_data(mail_conn);
    utl_smtp.write_data(mail_conn,'Date: '||to_char(sysdate-tz_offset,'dd mon yy hh24:mi:ss')||utl_tcp.crlf);
    utl_smtp.write_data(mail_conn,'From: '|| mail_from ||utl_tcp.crlf);
    utl_smtp.write_data(mail_conn,'To: "'|| mail_to ||'" <'||mail_to||'>'||utl_tcp.crlf);
    utl_smtp.write_data(mail_conn,'Subject: '||subject||utl_tcp.crlf);
    utl_smtp.write_data(mail_conn,utl_tcp.crlf);
    utl_smtp.write_data(mail_conn,replace_turkish_chars(mail_msg)||utl_tcp.crlf);
    utl_smtp.write_data(mail_conn,utl_tcp.crlf);
    utl_smtp.close_data(mail_conn);
    utl_smtp.quit(mail_conn);
    END;
    Edited by: odilibrary.com on Jun 12, 2012 5:26 PM

  • How to send SMS using java

    Dear All
    How we can send SMS(Short Message Service) to mobile phones using java.
    By Registering in some sites and using that user name and password we can send SMS.
    But after some limited SMS we have to pay for further use.
    I need some thing which we can use as free.
    Can any one help me
    Thanks in Advance

    The easiest way would be to send a regular email to a Email to SMS gateway.
    Check out the list of Email to SMS gateways at http://en.wikipedia.org/wiki/SMS_gateways

  • 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.

  • Send SMS Using Oracle Database Automatically

    Hi ALL:
    I want to send SMS from Oracle Database 9i automatically. Which reg. software can I use?

    Hello,
    Here is the Oracle Forms forum.
    You would have more chances to get answers by posting in the Database forum ;D
    Francois

  • Is it possible to send sms using java ?

    dear all ,
    I am doing one project . In which i want to send sms to mobile phone using java
    Any one knows please help me immediately ......
    I want this one to be immediately ...
    Thank you

    The answer's right here...
    http://www.java-answers.com/index.php?topic=12.0

  • Is it possible to send sms using N-GAGE -qd?

    Hello Friends,
    If we want to send sms, we have to register our sms connection using "PushRegistery", so that AMS can take care of this connection. but there is no PushRegistery api in MIDP1.0 that n-gage needs.
    so what is the way for N-GAGE-QD/MIDP1.0.
    Is there any alternative for PushRegistery?

    Hello Friends,
    If we want to send sms,
    we have to register our sms connection using
    "PushRegistery", so that AMS can take care of this
    connection. but there is no PushRegistery api in
    MIDP1.0 that n-gage needs.why do you need to register connection? is it specific to N-Gage?
    so what is the way for
    N-GAGE-QD/MIDP1.0.
    Is there any alternative
    for PushRegistery?use RMS...

  • Cannot send sms using pc suite Ver 7

    Hi - i have updated to pc suite version 7 - every time i send an sms it says message failed. Everything else is working fine - it seems pc suite will not pick up any of my message folders. Can anyone help please??? I am using the sirocco 8800

    Hi malakhi75,
    I can send sms from phone, but not thruogh Nokia Communication Centre. It seems to be an issue
    also find similar issue in
    /discussions/board/message?board.id=pcsuite&thread.id=27461

  • Send Email using Execute SQL Task??????

    I need to send the bad records in the data flow.  I am attempting to do this using Execute SQL Tasks.  Please give me steps I need to accomplish this.  I have not set any variables up yet, assuming I need too.

    Just add a Send mail Task (or Script Task if using gmail etc which requires authentication) and pass the file as an attachment. Make sure you've a step (Script Task) to check if file length > 0 (ie file has records) before you link it to Send mail Task
    ie use a conditional precedence constraint (Expression And Constraint option)
    See these links for more details
    http://dwteam.in/send-mail-in-ssis-using-gmail/
    http://www.mssqltips.com/sqlservertip/1753/sending-html-formatted-email-in-sql-server-using-the-ssis-script-task/
    https://www.simple-talk.com/sql/ssis/working-with-precedence-constraints-in-sql-server-integration-services/
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • 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

  • [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 ?

Maybe you are looking for

  • No connection between modem and time capsule !

    Hi everyone, I have bought the last week a 1 TB time capsule which I intend to use with my Imac. I have an ADSL modem that I want to connect to my capsule. To install it, I followed line by line the Configuration guide provided with the capsule viz.

  • Is it possible to convert a PDF to a high resolution image with ColdFusion?

    I would like to determine how to convert PDFs to high resolution images using ColdFusion. I'm running ColdFusion 9,0,0,251028 on CentOS 5.5 with Apache 2.2.3. The <cfpdf action = "thumbnail" ...> is all well and good for creating 72 dpi images of a P

  • Can I use QoS exam in ccnp voice?

    Hi all, I have a doubt. I made a ccip exam and will expire in 2015, even retired. When I  made the QoS exam,  i be enroled in ccnp voice. Now I have cvoice, cipt1 and cipt2. If I take the tshoot voice exam, I will become ccnp voice certified? Or I ha

  • How to get Itunes media on iPhone back to PC or ITunes?

    Hi all, I have an IPHONE 4S, and (I wont bore you with the details) I have all of my purchased music on it (downloaded from ITUNES) and all of my CD installed music on my laptop. This was due to a catastrophic loss of media folder, and me attempting

  • Ipod 5th Gen not showing iOS7 update.

    I went to upgrade my Son's ipod touch 5th gen, and it would not give me the option to upgrade to ios7. It showed the software running was 6.1.3 and that it was up to date. The model of his ipod is MD720LL/A. Thought all 5th gens got iOS7?