Mail sent from stored procedure: empty body

I've got a problem with a stored procedure. Its task is sending an email to some recipients passed from an another procedure. The problem is that the body of the email is empty and I don't know why!
Here's the script of this procedure:
Thank you very much in advance for your time!
CREATE OR REPLACE PROCEDURE ETL.LANCIA_EMAIL_PARAM
p_IN_FROM in VARCHAR2 default null,
p_IN_TO in VARCHAR2 default null,
p_IN_TO2 in VARCHAR2 default null,
p_IN_TO3 in VARCHAR2 default null,
p_IN_TO4 in VARCHAR2 default null,
p_IN_TO5 in VARCHAR2 default null,
p_IN_TO6 in VARCHAR2 default null,
p_IN_TO7 in VARCHAR2 default null,
p_IN_TO8 in VARCHAR2 default null,
p_IN_TO9 in VARCHAR2 default null,
p_IN_TO10 in VARCHAR2 default null,
p_IN_TO11 in VARCHAR2 default null,
p_IN_TO12 in VARCHAR2 default null,
p_IN_TO13 in VARCHAR2 default null,
p_IN_TO14 in VARCHAR2 default null,
p_IN_TO15 in VARCHAR2 default null,
p_IN_TO16 in VARCHAR2 default null,
p_IN_TO17 in VARCHAR2 default null,
p_IN_TO18 in VARCHAR2 default null,
p_IN_TO19 in VARCHAR2 default null,
p_IN_TO20 in VARCHAR2 default null,
p_IN_TO21 in VARCHAR2 default null,
p_IN_TO22 in VARCHAR2 default null,
p_IN_OGG in VARCHAR2 default null,
p_IN_MSGEMAIL in VARCHAR2 default null
IS
--mailhost VARCHAR2(30) := 'smtp.xxx.it';
mailhost VARCHAR2(30) := 'notesrelay.sd.xxx.it'; /* ripristinato il 29/11/2010 da LdP per controllo ODM*/
-- dichiarazione di una variabile di tipo utl_smtp.connection
-- a cui verr? assegnato l'SMTP ed il numero di porta (25)
conn utl_smtp.connection;
crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
mesg VARCHAR2( 32767 );
DATA_START varchar2(20) := TO_CHAR(SYSDATE,'DD-MM-YYYY');
IN_FROM VARCHAR2(30) := p_IN_FROM;
IN_TO VARCHAR2(300) := p_IN_TO ;
IN_TO2 VARCHAR2(300) := p_IN_TO2 ;
IN_TO3 VARCHAR2(300) := p_IN_TO3 ;
IN_TO4 VARCHAR2(300) := p_IN_TO4 ;
IN_TO5 VARCHAR2(300) := p_IN_TO5 ;
IN_TO6 VARCHAR2(300) := p_IN_TO6 ;
IN_TO7 VARCHAR2(300) := p_IN_TO7 ;
IN_TO8 VARCHAR2(300) := p_IN_TO8 ;
IN_TO9 VARCHAR2(300) := p_IN_TO9 ;
IN_TO10 VARCHAR2(300) := p_IN_TO10;
IN_TO11 VARCHAR2(300) := p_IN_TO11;
IN_TO12 VARCHAR2(300) := p_IN_TO12;
IN_TO13 VARCHAR2(300) := p_IN_TO13;
IN_TO14 VARCHAR2(300) := p_IN_TO14;
IN_TO15 VARCHAR2(300) := p_IN_TO15;
IN_TO16 VARCHAR2(300) := p_IN_TO16;
IN_TO17 VARCHAR2(300) := p_IN_TO17;
IN_TO18 VARCHAR2(300) := p_IN_TO18;
IN_TO19 VARCHAR2(300) := p_IN_TO19;
IN_TO20 VARCHAR2(300) := p_IN_TO20;
IN_TO21 VARCHAR2(300) := p_IN_TO21;
IN_TO22 VARCHAR2(300) := p_IN_TO22;
IN_OGG VARCHAR2(300) := p_IN_OGG ;
IN_MSGEMAIL VARCHAR2(30000) := p_IN_MSGEMAIL;
BEGIN
-- Apertura di una connessione al server
conn := utl_smtp.open_connection (mailhost,25);
-- Assegnazione alla variabile mesg dell'intestazione della mail
mesg:='Date:'||TO_CHAR(SYSDATE,'dd mon yy hh24:mi:ss')||crlf||
'From:<'||IN_FROM||'>'||crlf||
'Subject:'||IN_OGG||crlf;
-- if IN_TO2 is not null then
-- mesg:=mesg||'To:'||IN_TO||','||IN_TO2||crlf||'';
-- else
-- mesg:=mesg||'To:'||IN_TO;
-- end if;
If IN_TO22 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2 ||','||IN_TO3 ||','||IN_TO4 ||','||IN_TO5 ||','||IN_TO6 ||','||IN_TO7 ||','||IN_TO8 ||','||IN_TO9 ||','||IN_TO10||','||IN_TO11||','||IN_TO12||','||IN_TO13||','||IN_TO14||','||IN_TO15||','||IN_TO16||','||IN_TO17||','||IN_TO18||','||IN_TO19||','||IN_TO20||','||IN_TO21||','||IN_TO22||crlf||'';
elsif IN_TO21 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2 ||','||IN_TO3 ||','||IN_TO4 ||','||IN_TO5 ||','||IN_TO6 ||','||IN_TO7 ||','||IN_TO8 ||','||IN_TO9 ||','||IN_TO10||','||IN_TO11||','||IN_TO12||','||IN_TO13||','||IN_TO14||','||IN_TO15||','||IN_TO16||','||IN_TO17||','||IN_TO18||','||IN_TO19||','||IN_TO20||','||IN_TO21||crlf||'';
elsif IN_TO20 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2 ||','||IN_TO3 ||','||IN_TO4 ||','||IN_TO5 ||','||IN_TO6 ||','||IN_TO7 ||','||IN_TO8 ||','||IN_TO9 ||','||IN_TO10||','||IN_TO11||','||IN_TO12||','||IN_TO13||','||IN_TO14||','||IN_TO15||','||IN_TO16||','||IN_TO17||','||IN_TO18||','||IN_TO19||','||IN_TO20||crlf||'';
elsif IN_TO19 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2 ||','||IN_TO3 ||','||IN_TO4 ||','||IN_TO5 ||','||IN_TO6 ||','||IN_TO7 ||','||IN_TO8 ||','||IN_TO9 ||','||IN_TO10||','||IN_TO11||','||IN_TO12||','||IN_TO13||','||IN_TO14||','||IN_TO15||','||IN_TO16||','||IN_TO17||','||IN_TO18||','||IN_TO19||crlf||'';
elsif IN_TO18 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2 ||','||IN_TO3 ||','||IN_TO4 ||','||IN_TO5 ||','||IN_TO6 ||','||IN_TO7 ||','||IN_TO8 ||','||IN_TO9 ||','||IN_TO10||','||IN_TO11||','||IN_TO12||','||IN_TO13||','||IN_TO14||','||IN_TO15||','||IN_TO16||','||IN_TO17||','||IN_TO18||crlf||'';
elsif IN_TO17 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2 ||','||IN_TO3 ||','||IN_TO4 ||','||IN_TO5 ||','||IN_TO6 ||','||IN_TO7 ||','||IN_TO8 ||','||IN_TO9 ||','||IN_TO10||','||IN_TO11||','||IN_TO12||','||IN_TO13||','||IN_TO14||','||IN_TO15||','||IN_TO16||','||IN_TO17||crlf||'';
elsif IN_TO16 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2 ||','||IN_TO3 ||','||IN_TO4 ||','||IN_TO5 ||','||IN_TO6 ||','||IN_TO7 ||','||IN_TO8 ||','||IN_TO9 ||','||IN_TO10||','||IN_TO11||','||IN_TO12||','||IN_TO13||','||IN_TO14||','||IN_TO15||','||IN_TO16||crlf||'';
elsif IN_TO15 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2 ||','||IN_TO3 ||','||IN_TO4 ||','||IN_TO5 ||','||IN_TO6 ||','||IN_TO7 ||','||IN_TO8 ||','||IN_TO9 ||','||IN_TO10||','||IN_TO11||','||IN_TO12||','||IN_TO13||','||IN_TO14||','||IN_TO15||crlf||'';
elsif IN_TO14 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2 ||','||IN_TO3 ||','||IN_TO4 ||','||IN_TO5 ||','||IN_TO6 ||','||IN_TO7 ||','||IN_TO8 ||','||IN_TO9 ||','||IN_TO10||','||IN_TO11||','||IN_TO12||','||IN_TO13||','||IN_TO14||crlf||'';
elsif IN_TO13 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2 ||','||IN_TO3 ||','||IN_TO4 ||','||IN_TO5 ||','||IN_TO6 ||','||IN_TO7 ||','||IN_TO8 ||','||IN_TO9 ||','||IN_TO10||','||IN_TO11||','||IN_TO12||','||IN_TO13||crlf||'';
elsif IN_TO12 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2 ||','||IN_TO3 ||','||IN_TO4 ||','||IN_TO5 ||','||IN_TO6 ||','||IN_TO7 ||','||IN_TO8 ||','||IN_TO9 ||','||IN_TO10||','||IN_TO11||','||IN_TO12||crlf||'';
elsif IN_TO11 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2 ||','||IN_TO3 ||','||IN_TO4 ||','||IN_TO5 ||','||IN_TO6 ||','||IN_TO7 ||','||IN_TO8 ||','||IN_TO9 ||','||IN_TO10||','||IN_TO11||crlf||'';
elsif IN_TO10 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2 ||','||IN_TO3 ||','||IN_TO4 ||','||IN_TO5 ||','||IN_TO6 ||','||IN_TO7 ||','||IN_TO8 ||','||IN_TO9 ||','||IN_TO10||crlf||'';
elsif IN_TO9 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2 ||','||IN_TO3 ||','||IN_TO4 ||','||IN_TO5 ||','||IN_TO6 ||','||IN_TO7 ||','||IN_TO8 ||','||IN_TO9 ||crlf||'';
elsif IN_TO8 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2 ||','||IN_TO3 ||','||IN_TO4 ||','||IN_TO5 ||','||IN_TO6 ||','||IN_TO7 ||','||IN_TO8 ||crlf||'';
elsif IN_TO7 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2||','||IN_TO3||','||IN_TO4||','||IN_TO5||','||IN_TO6||','||IN_TO7||crlf||'';
elsif IN_TO6 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2||','||IN_TO3||','||IN_TO4||','||IN_TO5||','||IN_TO6||crlf||'';
elsif IN_TO5 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2||','||IN_TO3||','||IN_TO4||','||IN_TO5||crlf||'';
elsif IN_TO4 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2||','||IN_TO3||','||IN_TO4||crlf||'';
elsif IN_TO3 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2||','||IN_TO3||crlf||'';
elsif IN_TO2 is not null then
mesg:=mesg||'To:'||IN_TO||','||IN_TO2||crlf||'';
else
mesg:=mesg||'To:'||IN_TO;
end if;
mesg:=mesg||crlf||IN_MSGEMAIL;
-- Apertura di un collegamento al server
utl_smtp.helo(conn, mailhost);
-- Inizio di una transazione di posta con il server passandogli il mittente
utl_smtp.mail(conn,IN_FROM);
-- il destinatario
utl_smtp.rcpt(conn,IN_TO);
if IN_TO2 is not null then utl_smtp.rcpt(conn,IN_TO2 ); end if;
if IN_TO3 is not null then utl_smtp.rcpt(conn,IN_TO3 ); end if;
if IN_TO4 is not null then utl_smtp.rcpt(conn,IN_TO4 ); end if;
if IN_TO5 is not null then utl_smtp.rcpt(conn,IN_TO5 ); end if;
if IN_TO6 is not null then utl_smtp.rcpt(conn,IN_TO6 ); end if;
if IN_TO7 is not null then utl_smtp.rcpt(conn,IN_TO7 ); end if;
if IN_TO8 is not null then utl_smtp.rcpt(conn,IN_TO8 ); end if;
if IN_TO9 is not null then utl_smtp.rcpt(conn,IN_TO9 ); end if;
if IN_TO10 is not null then utl_smtp.rcpt(conn,IN_TO10); end if;
if IN_TO11 is not null then utl_smtp.rcpt(conn,IN_TO11); end if;
if IN_TO12 is not null then utl_smtp.rcpt(conn,IN_TO12); end if;
if IN_TO13 is not null then utl_smtp.rcpt(conn,IN_TO13); end if;
if IN_TO14 is not null then utl_smtp.rcpt(conn,IN_TO14); end if;
if IN_TO15 is not null then utl_smtp.rcpt(conn,IN_TO15); end if;
if IN_TO16 is not null then utl_smtp.rcpt(conn,IN_TO16); end if;
if IN_TO17 is not null then utl_smtp.rcpt(conn,IN_TO17); end if;
if IN_TO18 is not null then utl_smtp.rcpt(conn,IN_TO18); end if;
if IN_TO19 is not null then utl_smtp.rcpt(conn,IN_TO19); end if;
if IN_TO20 is not null then utl_smtp.rcpt(conn,IN_TO20); end if;
if IN_TO21 is not null then utl_smtp.rcpt(conn,IN_TO21); end if;
if IN_TO22 is not null then utl_smtp.rcpt(conn,IN_TO22); end if;
-- ed il testo del messaggio
utl_smtp.data(conn, mesg);
-- Chiusura della connessione
DBMS_OUTPUT.PUT_LINE(mesg);
utl_smtp.quit(conn);
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line(SQLERRM);
END;
/

Horrible code.
Fact: when you REPEAT a variable or source code statement again and again - IT IS WRONG. It is not modularised. It is not robust, flexible, readable or maintainable.
The code should look as follows:
// a string array type is needed for dealing with multiple recipients - this
// can be defined as a SQL or PL/SQL type
// SQL type is used in the example as it is usable in both SQL and PL/SQL
// engines
create or replace type TStrings is table of varchar2(4000);
// the parameter signature and code for the procedure:
create or replace procedure EmailMessage(
  senderAddress varchar2 default '[email protected]',   --// the sender
  recipientList TStrings, --// array of recipients
  subject varchar2, --// subject of the mail
  message varchar2 --// e-mail body to send
) is
begin
  --// to build the TO string for the e-mail header
  for i in 1..recipientList.Count loop
    mesgTo := msgTo || recipientList(i);
    if i < recipientList.Count then
      mesgTo := msgTo || ',';
    end if;
  end loop;
  --// create the complete e-mail body
  --// (I would prefer a template string variable and
  --// and replacing tokens in it with the subject,
  --// recipients, sender, and so on
  mailBody := 'Mime-Version: 1.0 '||utl_tcp.CrLf||
              'Content-Type: text/plain'||utl_tcp.CrLf||
              'Subject: nvs-web server'||utl_tcp.CrLf||
              'To: '||mesgTo||utl_tcp.CrLf||
              'From: '||senderAddress||utl_tcp.CrLf||
              utl_tcp.CrLf||
              message;
  --// to specify the recipients to the SMTP server
  for i in 1..recipientList.Count loop
    utl_smtp.rcpt( conn, recipientList(i) );
  end loop;
end;You should also consider using UTL_MAIL as it serves fine for sending basic e-mails, and basic e-mails with a single attachment.

Similar Messages

  • Mail sent from my iPhone 4S stopped showing in Outlook

    Hi,
    Till Monday all was fine with the way mails sent from my iPhone 4S / iPad would also show up in my Outlook 2007 sent folder.
    This suddenly stopped in case of mails sent from the iPhone and I cannot seem to find a solution, have attempted a reboot of the phone , deleted and redone the email account ( gmail apps account ) , checked all settings on the email account , deleted and reinstalled the account in Outlook as well .
    Any clues anyone ??? Thanks in advance for the help
    Samir

    What you did a reboot, was that a reset?
    Reset your iPhone by pressing the 'Sleep' and 'Home' button at the same time for about 15 seconds or so. Your iPhone will then go through a reset / reboot procedure and will be ready for use within about a minute.
    Don't worry about doing this as you will not lose data or settings.
    Good luck and do report back.

  • How to generate a report from stored procedure

    I would like to generate a report from stored procedure.
    I used to work on sql server. this can be done as easy as put a select statement at the end of stored procedure.
    The resule can be displayed on the development IDE, like sql developer or consume by Java JDBC client.
    is there equivalent way to do this in Oracle stored procedure?

    Hi,
    What type of report you are looking..for.. ??
    As you said that "I used to work on sql server. this can be done as easy as put a select statement at the end of stored procedure. "
    When you execute it will return the result set and you will display directly on the FrontEnd.. Is my Understanding is correct Up to here.
    See, In oracle you have call some custom stored procedures as you did in SQL Sever, but you have return the Results Sets, with help of Out put paramter, Either Cursors or Varrays..
    or Else you can generate the Html reports based on your requirement, HTML can be used in the stored procedures of Oracle which will generate for your, you need to code it.
    I could not able get the relevant link for your reference.
    I will get back to you on this.
    - Pavan Kumar N

  • Mail sent from iPad not appearing on desktop (windows) pc

    Have had to change my BT Yahoo email account to BT Mail so on the iPad deleted the BT yahoo account and then added the BT mail account.  Problem is that mail sent from iPad no longer appears on the (windows) pc. What am I missing
    ipad iOs 7.1.2

    If it is IMAP, then obviously something is wrong. I don't know if there is a problem on the computer setup. Are you sending the email from a web browser or from an email client? I don't think that should matter anyway unless you have incorrect settings in the email client.
    Have you tried sending an email from your computer and see if it shows up as sent mail on the iPad?  Have you considered deleting the account and then add it back yourself on the iPad?

  • Is it easily possible to synchronize mails sent from iphone 3GS with MacBook Pro retina

    is it easily possible to synchronize mails sent from iphone 3GS with MacBook Pro retina

    Read through this:
    http://clients.websavers.ca/whmcs/knowledgebase/115/Keeping-your-Sent-folder-in- sync-across-devices.html

  • Mail sent from android phone does not appear in my pc icloud sent mail

    Can anyone educate me on why my mac mail sent from my android does not appear in
    my pc icloud mail as sent?

    What is the server address that the Android account is using?

  • E-mails sent from PC users the photos are not present

    When opening some e-mails sent from PC users the photos are not present anyone have the same situation.

    I have not had such a problem. Is the size of the message sufficient to actually contain photos, of might this be a case of embedded links to images on remote servers?
    Under the headers, is there any list of attachments?
    Ernie

  • Mails sent from Z10 are not getting downloaded using POP 3

    Hi,
    I have just upgraded from BB 9360 to Z10, all the mails sent from the Z10 are not getting downloaded on PC, I use POP 3 setting to download messages. Mails deleted from Z10 are getting downloaded
    Please let me know how to download mails sent from Z10

    Mail sent from the handheld on a POP3 email server is not synced to the server.
    You could upgrade to an IMAP account.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Problem with execute SSIS package from stored procedure

    Hi,
    I would like to execute SSIS package from stored procedure. Therefore, I implemented sp which exec SSISDB.CATALOG.CREATE_EXECUTION method. When I try to test it from SSMS on remote server, I got error that
    I was able to solve by adding “WITH EXECUTE AS …”. Then I got another error: The server principal "Domain\user" is not able to access the database "SSISDB" under the current security context. On Internet, I found a couple post that describe
    how to access SSIS catalog (one of them by Ke Yang -
    http://blogs.msdn.com/b/mattm/archive/2012/03/20/ssis-catalog-access-control-tips.aspx). It didn’t help. I’m still getting the error message.
    How to debug this issue?
    Any suggestion?
    Thanks
    SQL Server 2014 BI

    SSMS does not propagate user credentials thus the error
    Arthur
    MyBlog
    Twitter

  • Calling DTS package from Stored Procedure

    I am getting error calling DTS package from CF.
    So i want to call DTS package from SQL Server Stored
    Procedure.
    DTS package create text file. So no need of input or output
    parameter.
    What is the syntax?.
    thanks for ur help.

    Ted Kruger explains how this can be done in his blog post
    Run SSIS Package from Stored Procedure
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog

  • Best method to transfer large strings (XML data) to/from stored procedure

    Hi!
    I'm trying to call a PL/SQL procedure from Java. The procedure inputs a string (XML) that is parsed, and returns a result string (also XML).
    Typical size of the string is 5kb -> 1mb.
    I can see two possible solutions:
    1) String / LONG
    2) CLOB (Using DMBS_LOB.createTemporary and getting a CLOB locator and passing the locator to the stored procedure)
    Does anyone have other suggestions?
    What is the fastest method for transferring XML structures from to and from stored procedures?
    Anders

    Anders,
    I would say it depends on your requirement. Both the methods have some advantages and disadvantages.
    Using a CLOB means that you have to use vendor specific libraries but this is more extendible and I fast too.
    Using String/Long will be more portable in the long run but again you lose on speed/performance.
    Just a doubt of mine... If I got it correct, you are transforming one XML to another XML based on some conditions. Why dont you use XSL and XSL StyleSheet Processor packaged with XDK for this? I think this would be the fastest way.
    Hope this helps.

  • System command execution from stored procedure

    Hello World,
    How to run System command from stored procedure ?
    For example :
    Delete a file
    running a programm,
    Is it possible ?
    H.M

    Years ago I did this by writing an output file with commands into a directory and had a cron job looking for this file. At the end of the run the file was removed.
    Never checked if there are other possibilities nowadays.
    cu
    Andreas

  • Imap mail sent from my iphone does not show up in the sent folder on my desktop

    imap mail sent from my iphone or ipad does not show up in the sent folder on my desktop

    Hi Bob,
    I'm using Mac Mail 4.5
    I have set up my mail preferences to include a "From"
    Web mail includes the appropriate "from" header information.
    Interestingly, when I send emails from this account on other machines it's ok.
    (ipad2,iPhone 3s,powermac)
    It just seems to be the MacBook Pro that is presenting this error.
    As an aside, my ISP host recently upgraded from Pop to Imap.
    Simon

  • Force mails sent from webmail route thru smarthost

    I have already set a global mailroutingsmarthost in the ldap server so
    that recipient address not matched in the ldap will go to it for relaying.
    But I would like to config the Messaging Server (ver. 6.3) such that
    for all mails sent from the webmail interface, they will go thru this smarthost regardless of
    their address form (i.e. even if the recipient address find matches in the ldap server)
    How to do it?

    webbburt777 wrote:
    But I would like to config the Messaging Server (ver. 6.3) such that
    for all mails sent from the webmail interface, they will go thru this smarthost regardless of
    their address form (i.e. even if the recipient address find matches in the ldap server)The service.http.smtphost option controls which email server receives emails sent by the webmail interface e.g.
    cd <msg_srv_base>/sbin/
    ./configutil -o service.http.smtphost -v <smarthost hostname>
    ./stop-msg http;./start-msg httpRegards,
    Shane.

  • Issue with Executing OS commands from Stored Procedure

    I am trying to execute the scripts provided at :
    http://github.com/xtender/XT_SHELL
    provided by xtender user.
    As required, I have asked my DBAs to grant privileges by executing the following scripts:
    Begin
      --change to needed permissions and execute
      dbms_java.grant_permission( 'ODS', 'SYS:java.io.FilePermission', '/var/factiva/ODS/bin/CVIM_Rpt_ExportCSVFile’, 'read,write,execute' );
    end;
    /where CVIM_Rpt_ExportCSVFile is my script residing in the Unix server where my Oracle is installed.
    The error I am facing when I try to execute the following command is:
    select * from table(xt_shell.shell_exec('/var/scripts/CVIM_Rpt_ExportCSVFile',100))
    Exception:the Permission (java.io.FilePermission /var/scripts/CVIM_Rpt_ExportCSVFile execute) has not been granted to ODS. The PL/SQL to grant this is dbms_java.grant_permission( 'ODS', 'SYS:java.io.FilePermission', '/var/scripts/CVIM_Rpt_ExportCSVFile', 'execute' )I have asked my DBA to also execute the following scripts: - But I still see the same error as above. I am not able to figure out whats going on. Can anyone pls help me out??
    EXEC Dbms_Java.Grant_Permission('ODS', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
    EXEC Dbms_Java.Grant_Permission(ODS', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');
    dbms_java.grant_permission( 'ODS', 'SYS:java.io.FilePermission', '/var/scripts/CVIM_Rpt_ExportCSVFile', 'execute' )

    DUPLICATE
    ===============================================================
    Issue with Executing OS commands from Stored Procedure
    ==============================================================

Maybe you are looking for

  • X1 Carbon 2014 battery

    I have had my new X1 carbon for a couple of weeks. Up until this last weekend I haven't used it for longer than 2 hours without charging it again. This past weekend I decided I wanted to see how long the battery life really was. After about 3 hours,

  • How can I put text into a cell with a formula?

    I'm trying to sort a budget in Numbers 3.1. I have a sum of column of cells that I'm adding up. The cell that has a total number looks like this: =SUM(F). I want to have that sum have a $ sign in front of it. I've ready everywhere that I could do ="$

  • Error when clicking in the filter zone of a carac. with hierarchy

    Hello, I am using the SAP BI7 version and I have a problem in the BEX anayzer. When I click in the filter zone and when I choose a filter caracteristic that contains a hierarchy I have the following error message and i am killed: <b>Class RSBOLAP 000

  • Report portlets mismatch after import

    Hi everybody. After importing my production portal into my development portal, all the report portlets aren't on same pages as production. By that I mean that report portlet1 on page1 is showing on page2, report portlet2 on page2 is showing on page5,

  • ITunes not displaying entire page w/Mavericks

    It only allows me to see the top of the page in itunes when I enter full screen mode.  Any suggestions?