Sending an emial through PL/SQL procedure

Hi All,
Can any one suggest me how to send an email through PL/SQL procedure without any mail package installed in Database.
Thanks

Does "without any mail package" mean that you don't want to use the UTL_MAIL or UTL_SMTP packages that Oracle delivers (depending on the version of Oracle that you haven't mentioned)?
Justin

Similar Messages

  • Xml file not generated through Pl/sql procedure as a concurrent executable

    Hi,
    I getting error while genarating xml file through Pl/sql procedure as a concurrent executable file.
    Error Message:
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource

    Hi,
    Make sure the file has the XML header:
    <?xml version="1.0" encoding="UTF-8"?>
    or similar.
    Regards,
    Gareth
    Blog: http://garethroberts.blogspot.com/

  • How i can load excel sheet into a table in oracle through pl/sql procedure

    Hi,
    How i can load excel sheet into a table in oracle through pl/sql procedure or a pl/sql block. Excel sheet is saved on my c or d drive on my machine. In xls format.

    Depending on how big your spreadsheet is and how frequently you want to do this you might want to contruct insert statements in excel, then run these. I have done this to load a few hundred rows for a one off test on dev.
    e.g. if you have values 1 and 'a' in you spread sheet and want to insert them in to table xxx col1 & 2:
    | /|   A   |   B   |    C
    |1 |col1   |col2   |
    |2 |      1|a      |="insert into xxx ("&$A$1&","&B1&") values ("&A2&",'"&B2&"');"then paste the contents of colum C
    insert into xxx (col1,col2) values (1,'a');into sqlplus or a script.

  • Send String[][] type to pl/sql procedure from function in App.module

    Hi,
    I use jdveloper 11.1.1.3.0
    I have a pl/sql procedure. the input type argument is 2-dimensional array(TAR) :
    types:
    create or replace TYPE ARRAYWEB as varray(160) of VARCHAR2(200);
    create or replace TYPE TAR as table of ARRAYWEB;
    Procedure:
    PROCEDURE testi(info IN TAR )
    I want to send type String[][] to this procedure from a function in Application module:
    1: String[][] str;
    2: CallableStatement plsqlBlock = null;
    3: String statement = "BEGIN testi(:1); END;";
    4: plsqlBlock = getDBTransaction().createCallableStatement(statement, 0);
    5: plsqlBlock.setArray(1, str); //get error
    6: plsqlBlock.executeUpdate();
    but in line 5 I don't know what type I should use, and this type(Array) doesn't work
    Habib

    Maybe this can help: http://www.devx.com/tips/Tip/22034
    Dario

  • Best Practice for ViewObjects when inserting data through pl/sql procedure

    My applications is oracle form based enterprise level application and we are now developing new module in ADF 11g but there is restriction that all data insertion, updation, and deletion will be through oracle pl/sql procedures. Now my question is that adf pages should be binded with ViewObjects based on Entity Object or with Viewobjects not based on Entity / sql query. Currently I have developed pages with programmatic ViewObjects which are neither based on Entity Objects nor on sql query. In those view objects, i create transient attributes and then used it to create adf pages. Then on save, i extract the data from ViewObject's current row and pass it to procedure. This is working fine but just wondering whether this approach is ok or there is better alternative for that. Ideally i want to create ViewObjects based on EntityObject but don't finding any way to synchronize entityObjects with data inserted through procedures.

    Hi,
    I create a EO for the Database-View and override the doDML()-Method. For insert/update and delete I call the pl/sql-functions.
    See "38.5 Basing an Entity Object on a PL/SQL Package API" in Oracle® Fusion Middleware Fusion Developer's Guide for Oracle Application Development
    Framework.

  • Sending OS command from PL/SQL procedure

    "How can I send a operating system comand from PL/SQL procedure?
    I want to move , to copy , delete a file from a PL/sql procedure. i.e under unix send mv, cp or
    rm command";
    my e-mail is [email protected]

    take a look at
    http://asktom.oracle.com/pls/ask/f?p=4950:8:881946
    regards
    Freek D'Hooge
    "How can I send a operating system comand from PL/SQL procedure?
    I want to move , to copy , delete a file from a PL/sql procedure. i.e under unix send mv, cp or
    rm command";
    my e-mail is [email protected]

  • Popup document through PL/SQL Procedure

    Hi, I am wandering howcome we popup any document, sitting on my server ,through a PL/SQL procedure. I do not want to read the content of that document, which we can do through UTL_FILE, but want to open that document. I have the URL(,location) of the document ,but just don't know how I can open this document with URL, in PL/SQL.
    So, help me out. Thanks.

    Reading a web page using PLSQL is really easy.
    If you are running 10g, skip this ACL prerequisite and jump to the code below.
    If you are running 11g, there are a couple of housekeeping prerequisites. You need to create the network ACLs in the database to allow access to the pages you are interested in. Like this:
    BEGIN
          -- create the ACL
          DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(
             acl          => 'oreillynet-permissions.xml'
            ,description  => 'Network permissions for www.oreillynet.com'
            ,principal    => 'SYSTEM'
            ,is_grant     => TRUE
            ,privilege    => 'connect'
            ,start_date   => SYSTIMESTAMP
            ,end_date     => NULL
          -- assign privileges to the ACL
          DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE (
              acl        => 'oreillynet-permissions.xml'
             ,principal  => 'SYSTEM'
             ,is_grant   => TRUE
             ,privilege  => 'connect'
             ,start_date => SYSTIMESTAMP
             ,end_date   => null
          -- define the allowable destintions
          DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (
              acl        => 'oreillynet-permissions.xml'
             ,host       => 'www.orillynet.com'
             ,lower_port => 80
             ,upper_port => 80
        END;Here is the code to read the web page:
    DECLARE
       WebPageURL HttpUriType;
       WebPage CLOB;
    BEGIN
       --Create an instance of the type pointing
       --to Arup Nanda's Author Bio page at OReilly
       WebPageURL := HttpUriType.createUri('http://www.oreillynet.com/pub/au/2307');
       --Retrieve the web page via HTTP
       WebPage := WebPageURL.getclob();
       --Display the page title
       DBMS_OUTPUT.PUT_LINE(regexp_substr(WebPage,'<title>.*</title>'));
    END;
    /

  • Send Datetime2 value to a SQL Procedure from Java using Hibernate

    Hi All,
    I Have a Procedure which takes a parameter of type datetime2.
    The procedure is called from Java Hibernate.
    How can I Pass datetime2 value to SQL procedure from Java?
    Thanks in advance,
    Shraddha Gore

    You may define a global empty array in some package. Then you can do:
    SQL> CREATE OR REPLACE PACKAGE pkg
    AS
       g_empty   DBMS_SQL.varchar2_table;
    END pkg;
    Package created.
    SQL> CREATE OR REPLACE PROCEDURE p (
       p_tuids   IN   DBMS_SQL.varchar2_table "DEFAULT pkg.g_empty"
    AS
    BEGIN
       NULL;
    END p;
    Procedure created.
    SQL> BEGIN
       p ();
    END;
    PL/SQL procedure successfully completed.

  • RMAN through PL/SQL procedure

    Hi there
    I am using oracle 10g 10.2.0.3 in AIX environment
    I want to run RMAN backup from PL/SQL procedure. Is there any provision to do that.
    Please guide me .
    Regards
    hassan

    Hemant K Chitale wrote:
    DBMS_BACKUP_RESTORE is not intended to be used for Database BACKUPS and RESTORES.
    It is to be used with Oracle Support assistance if normal RMAN commands cannot be used (e.g. the backuppiece containing a controlfile backup cannot be identified).
    I do not suggest build your backup recovery strategy using DBMS_BACKUP_RESTORE.Its just learning how to restore/recover database using this package( internally how work/do RMAN session).So if you want build your backup policy of course you have to refer first documentation (backup recovery guide).

  • Email through pl/sql procedure

    Hello,
    I want to send email from oracle database. I am running the procedure on Oracle9i on Linux (downloaded from this site).I have copied demo_mail.sql provided by Otn sample code. After running this procedure I am getting error:
    ORA-29278 SMTP Transient error: 421 service not available. can any one guide me how to avoid this error.
    Amita

    hello -
    where can I find exactly demo_mail.sql code ?
    Thanks
    Vidya R.

  • Sending mail attachment through PL/SQL, message not showing in mail body

    Dear All,
    I am sending mail with attachment(pdf file) through oracle.
    file is attached and showing.
    problem is,message is not displaying in message body, it's displaying also in file attachment.
    i want to show message in body.
    mime setting is as follow:
    mesg := mesg || 'Mime-Version: 1.0' || crlf ||
    'Content-Type: multipart/mixed; boundary="' || boundary || '"' ||
    crlf || crlf ||
    'This is a Mime message, which your current mail reader may not' || crlf ||
    'understand. Parts of the message will appear as text. If the remainder' || crlf ||
    'appears as random characters in the message body, instead of as' || crlf ||
    'attachments, then you''ll have to extract these parts and decode them' || crlf ||
    'manually.' || crlf || crlf;
    utl_smtp.write_data(conn,mesg);"
    -- Write the text message or message file or message CLOB, if any
    if (message is not null and length(message) > 0) or
    clob_message is not null then
    mesg := '--' || boundary || crlf ||
    'Content-Type: text/plain; name="message.txt"; charset=US-ASCII' ||
    crlf ||
    'Content-Disposition: inline; filename="message.txt"' || crlf ||
    'Content-Transfer-Encoding: 7bit' || crlf || crlf;
    utl_smtp.write_data(conn,mesg);
    if instr(message,'/') = 1 or instr(message,':\') = 2 or
    instr(message,'
    ') = 1 then
    split_path_name(message,directory_path,file_name);
    append_file(directory_path,file_name,'text',conn);
    utl_smtp.write_data(conn,crlf);
    elsif message is not null and length(message) > 0 then
    utl_smtp.write_data(conn,message);
    if length(message) = 1 or
    substr(message,length(message)-1) != crlf then
    utl_smtp.write_data(conn,crlf);
    end if;
    elsif clob_message is not null then
    append_file(null,'message.txt','text/plain',conn,clob_message);
    end if;
    end if;please help

    dear, when i open this auto generated mail into outlook express, then message is showing properly, but in microsoft outlook 2007, it's showing message as text attachment.
    I appreciate any hint...
    thanx.

  • Print my input which i accept in my procedure in Excel Sheet through pl/sql

    Respected Sir,
    If i want to print my input in excel sheet which i took as a input parameter for my procedure
    for example my procedure:
    create or replace procedure create_csv('hello this is wonder world').
    I want to print hello this is wonder world in excel sheet.
    How can i acheive this through pl/sql procedure. with out utl_file predefined package.
    Please help me regarding this.
    Sincerely,
    Chandrasekhar B.S.

    maybe this link accessing oracle via access and excel might be of some help.

  • Problem sending a value to pls/ql procedure

    Hi
    i have a weirdly probelm in my MDB.
    I will try to explain the problem below.
    I have an MDB that recives an XML and retrieves a vlue from XMl and sends it to a pl/sql procedure for processing and storing it.
    String input = ixml.getParent();
    cs = connection.prepareCall("begin custom.get_activity_children(?); end;");
    cs.setString(1, input);
    cs.setQueryTimeout(TIME_OUT);
    cs.execute();
    it is done in the below manner
    the pl/sql receives this and call an API method get children
    proceudure get_children (input varchar2) IS
    result tabtype;
    Begin
    insert into Test values(input);
    schema.get_children_api(input,result);
    insert into Test values(result.count );
    insert into Children_id values (result(1));
    END;
    Test table carried values "12345" and "0". Also note that input value was received correctly by pl/sql procedure.
    This being the situation the messages received in the MDB has a valid input value but it still returns the result.count as 0.
    So ib tested it in another way,
    i wrote a stand alone pl/sql procedure like below,
    DECLARE
    input varchar2 := '12345';
    result tabtype;
    Begin
    insert into Test values(input);
    schema.get_children_api(input,result);
    insert into Test values(result.count );
    insert into Children_id values (result(1));
    END;
    Test table carried values "12345" and "0".
    but here i get the correct out put and result is set to 1.

    The question isn't all that clear to me.
    But myself I never rely on 'count' values returned from the API.
    The only sure thing is that it either threw an exception or it didn't. Other than that you must structure your SQL such that it returns results if you need them.

  • Sending E-Mail from PL/SQL

    I have used Oracle 9i (9.2.0.1) on windows Xp machine. I want to send e-mail
    from PL/SQL procedure.
    I execuete the procedure as follows friom SQL prompt in SCOTT user..
    execute prc_send_mail('[email protected]','[email protected]','Test message');
    before that I create the procedure in scott user and it is created successfully in scott user..
    Procedue is as follows...
    CREATE OR REPLACE PROCEDURE prc_send_mail (p_sender IN VARCHAR2,
    p_recipient IN VARCHAR2,
    p_message IN VARCHAR2)
    as
    l_mailhost VARCHAR2(255) := 'mail.yahoo.com';
    l_mail_conn utl_smtp.connection;
    BEGIN
    l_mail_conn := utl_smtp.open_connection(l_mailhost, 25);
    utl_smtp.helo(l_mail_conn, l_mailhost);
    utl_smtp.mail(l_mail_conn, p_sender);
    utl_smtp.rcpt(l_mail_conn, p_recipient);
    utl_smtp.open_data(l_mail_conn );
    utl_smtp.write_data(l_mail_conn, p_message);
    utl_smtp.close_data(l_mail_conn );
    utl_smtp.quit(l_mail_conn);
    end;
    unfortunately i have receiveed some error which I mentioned below...
    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 "SCOTT.PRC_SEND_MAIL", line 9
    ORA-06512: at line 1.
    Please anyone giove me the solution..

    > ORA-29278: SMTP transient error: 421 Service not available
    Not an Oracle error. This is the SMTP server telling you to go and get stuffed. It does not want to talk to you.
    See http://www.faqs.org/rfcs/rfc821.html.
    The RFC says that this type of response code can be for example when the SMTP server is about to shutdown - thus informing the client that it cannot be serviced.
    But seeing that you're trying to hijack mail.yahoo.com as your SMTP server.. I'm not surprise that the server is giving you the bird.

  • Loading data through pl/sql

    Hi frnds,
    i want to load .mdb table into oracle 9i through pl/sql procedure.
    i am doing this through sql* loader
    my script is :
    LOAD DATA INFILE '//empwrpub1/Data_Wrangler/Owens/Original Data/037 Refresh 10-06/SAP/SRM_INVOICE.txt'
    INTO TABLE SRM_INVOICE_200610
    FIELDS TERMINATED BY ',' ENCLOSED BY '"'
    LINES TERMINATED BY '\n'
    IGNORE 1 LINES
    now i want this through pl/sql procedure
    thanks in advance

    Hi,
    The two different questions have arised during this Forum.
    1. Load data through SQL loader from PL/SQL.
    2. Use of many DDL and DML statements in the process of Data Loading.
    I will start from the second Question :
    this is great question I myself has faced this problem like first create temporary tables load data, update spaces with null or date formatting etc.
    This is easily achieved when you load the data by using External Tables. There you need to write a script mentioning your datafile, location, column and line termination etc. In this same script you use your DDL statements first and then data loading script and there after DML if any.
    This block would look like something PL/SQL block.
    So, First questioin has also been answered with the condition that you have to use External tables and then load data by writing PL/SQL. I am not sure as I have never tried to call SQL loader commands from PL/SQL. So it Looks impossible. If at all you want to carry out the same activity from PL/SQL block then write a SQL loader Script, CTL file and then write a SHELL Program and then call it from PL/SQL Block.
    Bye

Maybe you are looking for

  • Work Manager 6.1 - Complex table Enhancement

    Hi All, I had created a custom class for a Complex Table - CodeGroup - which is attached - on top of Work Manager 5.3 Java Code. Now we are upgrading to SMP 3.0 and Work Manager 6.1, and this class is throwing this error during transmit: JAVA EXCEPTI

  • Says my address is wrong on my credit card and it is not!!!!!

    SAYS MY ADDRESS IS WRONG ON MY CREDIT CARD, SO IT WONT ACCEPT IT!

  • Solar Learning Map in web browser issue

    Hi I have assigned Learning material and end users in SOLAR02, after i created a learning map in SOLAR_LEARNING_MAP. the problem is when is display learning map in web browser it is only showing the structure with all the units, but the documents ass

  • To open Report in Maximize form when calling it from FORM

    Dear All, I am facing a problem related to Report.When a report is called from the FORM, this report is not openned in MAXIMIZE form. How will it be openned in Maximize form. If there is any solution for it. Please write.... Regards, Akhilesh P. Verm

  • Lightroom 3 on OSX version 10.8.5 - not reading raw files

    I have a new mackbrook pro, osx, version 10.8.5 with Lightroom 3. The program will open but will not read my raw files. Do I need an update for Lightroom 3? If so, which update? Iphoto will read the raw images and I can drag images from iphoto into l