Hw to use rcpt to and auth command in UTL SMTP

hi
can anyone provide me syntax for that or sample code?

CREATE OR REPLACE PROCEDURE SR3PMAIL ( P_MAILHOST IN VARCHAR2,
P_SENDER IN VARCHAR2,
P_RECIPIENT IN VARCHAR2,
P_CC IN VARCHAR2,
P_SUBJECT IN VARCHAR2,
P_MENSAG IN VARCHAR2 ) IS
-- APLICACAO...........UTILITARIOS --
-- SISTEMA.............SQL@REPLICATOR VERSAO 4.3 --
-- VERSAO..............4.3.1(MARÇO 2003) --
-- OBSERVACOES: --
-- AUTHOR..............RENAN MEDEIROS --
-- DATA................17/06/2004 - CODIFICAÇÃO --
-- 28/06/2006 - BUG - NAO ENVIAVA CC(COM COPIA) --
SR3$VER VARCHAR2(50) := '==>V5.0.1,28/06/2006-10:40,RENAN<==';
SR3NAM VARCHAR2(15) := 'SQL@Replicator';
SR3VER VARCHAR2(3) := '501'; /* VERSAO */
MENSAGEM VARCHAR2(30000) := P_MENSAG;
MENSAGEM2 VARCHAR2(30000) := NULL;
MAIL_CONN UTL_SMTP.CONNECTION;
CRLF VARCHAR2(0002) := CHR(13) || CHR(10);
MESG VARCHAR2(4000) := NULL;
DESTINO VARCHAR2(2000) := NULL;
DESTINO2 VARCHAR2(2000) := NULL;
TAMANHO BINARY_INTEGER := 1;
POSINI BINARY_INTEGER := 1;
POSFIM BINARY_INTEGER := 1;
POSEND BINARY_INTEGER := 1;
BEGIN
MENSAGEM := NULL;
MENSAGEM2:= NULL;
MENSAGEM := P_MENSAG;
DESTINO2 := REPLACE(P_RECIPIENT,';',' ')||' ';
FOR I IN 1..LENGTH(DESTINO2)
LOOP
DESTINO2 := REPLACE(DESTINO2,' ',' ');
END LOOP;
MAIL_CONN := UTL_SMTP.OPEN_CONNECTION( P_MAILHOST, 25 );
UTL_SMTP.HELO( MAIL_CONN, P_MAILHOST );
UTL_SMTP.MAIL( MAIL_CONN, P_SENDER );
MESG:=
'FROM: <' || P_SENDER || '>' || CRLF ||
'SUBJECT: ' || P_SUBJECT || CRLF;
MESG := MESG||
'TO:' || NVL(P_RECIPIENT,' ') || CRLF;
MESG := MESG||
'CC:' || NVL(P_CC,' ') || CRLF;
-- SEPARA OS DESTINATARIOS
POSINI:=1;
POSFIM:=0;
POSEND:=INSTR(DESTINO2,' ',-1,1);
TAMANHO:=POSFIM-POSINI;
WHILE POSFIM < POSEND
LOOP
POSINI:=POSFIM+1;
POSFIM:=INSTR(DESTINO2,' ',POSINI,1);
TAMANHO:=POSFIM-POSINI;
DESTINO:=SUBSTR(DESTINO2,POSINI,TAMANHO);
UTL_SMTP.RCPT( MAIL_CONN, DESTINO);
END LOOP;
DESTINO2:=NULL;
DESTINO :=NULL;
IF P_CC IS NOT NULL
THEN DESTINO2 := REPLACE(P_CC,';',' ')||' ';
FOR I IN 1..LENGTH(DESTINO2)
LOOP
DESTINO2 := REPLACE(DESTINO2,' ',' ');
END LOOP;
POSINI:=1;
POSFIM:=0;
POSEND:=INSTR(DESTINO2,' ',-1,1);
TAMANHO:=POSFIM-POSINI;
WHILE POSFIM < POSEND
LOOP
POSINI:=POSFIM+1;
POSFIM:=INSTR(DESTINO2,' ',POSINI,1);
TAMANHO:=POSFIM-POSINI;
DESTINO:=SUBSTR(DESTINO2,POSINI,TAMANHO);
UTL_SMTP.RCPT( MAIL_CONN, DESTINO);
END LOOP;
END IF;
UTL_SMTP.OPEN_DATA( MAIL_CONN);
UTL_SMTP.WRITE_DATA( MAIL_CONN, MESG||CRLF);
WHILE LENGTH(MENSAGEM) > 2000
LOOP
UTL_SMTP.WRITE_DATA( MAIL_CONN, SUBSTR(MENSAGEM,1,2000));
MENSAGEM2 := SUBSTR(MENSAGEM,2001,LENGTH(MENSAGEM)-2000);
MENSAGEM := MENSAGEM2;
END LOOP;
UTL_SMTP.WRITE_DATA( MAIL_CONN, MENSAGEM||CRLF);
UTL_SMTP.CLOSE_DATA( MAIL_CONN);
utl_smtp.quit(mail_conn);
END SR3PMAIL;
SHOW ERRORS

Similar Messages

  • To remove all personal information from an iPhone I am about to dispose of, is it sufficient to use the "erase and reset" command in Settings, or should I do something more?

    I am about to replace an iPhone 4.  I want to make sure that it contains no recoverable personal information, such a contacts, photos, e-mail, etc.  If I use the erase and reset function in Settings will that be sufficient?  Or is there a way to write over the old information in a manner similar to a "secure empty trash?"

    Try What to do before selling or giving away your iPhone, iPad, or iPod touch

  • Hw can  i use vrfy command in UTL SMTP or link LDAP with pl/sql

    i m using utl smtp to send email from oracle and
    i giving sender email address and receiver email address
    but when i m sending email from oracle if receivers address is within domain the
    then code will just give me error that undeliverable and sender will be system administer as auto mail as we always get and i m getting unable to replay if address is outside domain
    now i want to check if my sender email address is exists or not then hw can i check it bcause vrfy command is not useful and and some 1 told me to use rcpt to command i m getting undelivered mail in that case but unable to catch exception
    case here is that look up for email address from pl/sql on server?and what if sender is rediff or yahoo mean outside domain
    can anyone guide me?

    when you execute the program it would error out if the sender\recipient address is not available in the server.
    Regards,
    Bhagat

  • Why can't I use the Average and Join commands in an action?

    Something I do a hundred times a day is select two endpoints, average them, and join them. I tried to make an action and map it to an Fkey, but Illustrator won't allow the Average or Join commands in an action. When I tried using the Insert Menu Command, it made Illustrator crash. Finally I managed to do it without Illustrator crashing, but there is then no way to hit "OK" in the Average dialog box via the Actions palette. Why is this apparently impossible?

    You have to use Actions Palette Flyout menu  >> insert menu item to get those menu items reocorded.
    To get action to stop crashing you need to Actions Palette Flyout menu >> Playback Options >> 1 sec or greater.
    There already are keyboard commands CMD J & OPT CMD J for these. Unfotunately you cannot record for example the next menu choice step such as BOTH.  A script likely could be written for this though, and you can try posting in the Illustrator scripting forum.

  • Why Cant I use the copy and paste command in elements 7.0?

    I want to create gifs using images I created, but each time I try to use the copy command (ctrl+c) after the selecting the image, It wont allow me to.It keeps saying its because of a program error. I updated it, but I still cant use the copy command?
    help me please....

    See if resetting the photoshop elements 7 preferences clears things up:
    Restore all preferences to default settings  
         Press and hold Alt+Control+Shift (Windows) or Option+Command+Shift (Mac OS) as you start Photoshop Elements. You are prompted to delete the current settings.  
    New Preferences files are created the next time you start Photoshop Elements.  

  • Roll up command and CUBE command

    Please anyone explain me what is the use of ROLLUP and CUBE command in SQL and which situations it will be using.

    Rollup and cube, both of these will be helpfull in aggregate function along with group by.
    Roll up will results in data along with their summation.
    and Cube results in summation of all possible combination.
    It will be help when creating reports and some analytical data.
    Below is an article which give further more explanation
    http://www.oracle-base.com/articles/misc/rollup-cube-grouping-functions-and-grouping-sets.php

  • APO roles and auth objects

    Hello all,
    Can someone tell me the most common used Tcodes, roles and auth objects in SAP APO - DP and APO-SNP security
    thanks

    I was going to type them out but luckily for me found this link to the DP & SNP auth objects - the info there is as detailed as anything else I have seen
    http://help.sap.com/saphelp_scm50/helpdata/en/21/f6253b90e48743e10000000a11402f/content.htm
    There is a list of useful APO transactions here
    http://help.sap.com/bp_scmv241/documentation/SCM_AIO_BP_Function_List.xls
    I can't help with the standard roles as I build my own.

  • Cut, Copy and Paste commands don't work

    I am unable to use cut, copy and paste commands either by keyboard shortcuts or using the menu commands. This only happens in one account on the iBook, but not the other. Any suggestions?
    iBook G3   Mac OS X (10.3.8)  

    Try removing the finder preference.
    You will find it in
    Users/thenameoftheproblemuser/library/preferences/com.apple.finder.plist
    Drag the file to the desktop, log out and log back in. See if
    it works now.

  • Pre and post commands for navigation bar events

    we use the NavigationBar and its commands like BUTTON_INSERT, BUTTON_DELETE, etc.
    we need to execute certain queries/procedures just before or after the NavigationBar's ButtonCLick events mentioned above. can someone help?
    null

    Hi again,
    sorry it seems you are working with infobus api, I thought you are working with jsp, anyway the solution is similar I think, or maybe you can set you some events and capture them on the navigationbar.
    Sebastian

  • Hello. I have a problem with OEL 6.5 and ocfs2. When I mount ocfs2 with mount -a command all ocfs2 partitions mount and work, but when I reboot no ocfs2 partitions auto mount. No error messages in log. I use DAS FC and iSCSI FC.

    Hello.
    I have a problem with OEL 6.5 and ocfs2.
    When I mount ocfs2 with mount -a command all ocfs2 partitions mount and work, but when I reboot no ocfs2 partitions auto mount. No error messages in log. I use DAS FC and iSCSI FC.
    fstab:
    UUID=32130a0b-2e15-4067-9e65-62b7b3e53c72 /some/4 ocfs2 _netdev,defaults 0 0
    #UUID=af522894-c51e-45d6-bce8-c0206322d7ab /some/9 ocfs2 _netdev,defaults 0 0
    UUID=1126b3d2-09aa-4be0-8826-0b2a590ab995 /some/3 ocfs2 _netdev,defaults 0 0
    #UUID=9ea9113d-edcf-47ca-9c64-c0d4e18149c1 /some/8 ocfs2 _netdev,defaults 0 0
    UUID=a368f830-0808-4832-b294-d2d1bf909813 /some/5 ocfs2 _netdev,defaults 0 0
    UUID=ee816860-5a95-493c-8559-9d528e557a6d /some/6 ocfs2 _netdev,defaults 0 0
    UUID=3f87634f-7dbf-46ba-a84c-e8606b40acfe /some/7 ocfs2 _netdev,defaults 0 0
    UUID=5def16d7-1f58-4691-9d46-f3fa72b74890 /some/1 ocfs2 _netdev,defaults 0 0
    UUID=0e682b5a-8d75-40d1-8983-fa39dd5a0e54 /some/2 ocfs2 _netdev,defaults 0 0

    What is the output of:
    # chkconfig --list o2cb
    # chkconfig --list ocfs2
    # cat /etc/ocfs2/cluster.conf

  • How to create and use library JAR files with command-line tools?

    Development Tools -> General Questions:
    I am trying to figure out how to put utility classes into JAR files and then compile and run applications against those JAR files using the command-line javac, jar, and java tools. I am using jdk1.7.0_17 on Debian GNU/Linux 6.0.7.
    I have posted a simple example with one utility class, one console application class, and a Makefile:
    http://holgerdanske.com/users/dpchrist/java/examples/jar-20130520-2134.tar.gz
    Here is a console session:
    2013-05-20 21:39:01 dpchrist@desktop ~/sandbox/java/jar
    $ cat src/com/example/util/Hello.java
    package com.example.util;
    public class Hello {
        public static void hello(String arg) {
         System.out.println("hello, " + arg);
    2013-05-20 21:39:12 dpchrist@desktop ~/sandbox/java/jar
    $ cat src/com/example/hello/HelloConsole.java
    package com.example.hello;
    import static com.example.util.Hello.hello;
    public class HelloConsole {
        public static void main(String [] args) {
         hello("world!");
    2013-05-20 21:39:21 dpchrist@desktop ~/sandbox/java/jar
    $ make
    rm -f hello
    find . -name '*.class' -delete
    javac src/com/example/util/Hello.java
    javac -cp src src/com/example/hello/HelloConsole.java
    echo "java -cp src com.example.hello.HelloConsole" > hello
    chmod +x hello
    2013-05-20 21:39:28 dpchrist@desktop ~/sandbox/java/jar
    $ ./hello
    hello, world!I believe I am looking for:
    1. Command-line invocation of "jar" to put the utility class bytecode file (Hello.class) into a JAR?
    2. Command-line invocation of "javac" to compile the application (HelloConsole.java) against the JAR file?
    3. Command-line invocation of "java" to run the application (HelloConsole.class) against the JAR file?
    I already know how t compile the utility class file.
    Any suggestions?
    TIA,
    David

    I finally figured it out:
    1. All name spaces must match -- identifiers, packages, file system, JAR contents, etc..
    2. Tools must be invoked from specific working directories with specific option arguments, all according to the project name space.
    My key discovery was that if the code says
    import com.example.util.Hello;then the JAR must contain
    com/example/util/Hello.classand I must invoke the compiler and interpreter with an -classpath argument that is the full path to the JAR file
    -classpath ext/com/example/util.jarThe code is here:
    http://holgerdanske.com/users/dpchrist/java/examples/jar-20130525-1301.tar.gz
    Here is a console session that demonstrates building and running the code two ways:
    1. Compiling the utility class into bytecode, compiling the application class against the utility bytecode, and running the application bytecode against the utility bytecode.
    2. Putting the (previously compiled) utility bytecode into a JAR and running the application bytecode against the JAR. (Note that recompiling the application against the JAR was unnecessary.)
    (If you don't know Make, understand that the working directory is reset to the initial working directory prior to each and every command issued by Make):
    2013-05-25 14:02:47 dpchrist@desktop ~/sandbox/java/jar
    $ cat apps/com/example/hello/Console.java
    package com.example.hello;
    import com.example.util.Hello;
    public class Console {
        public static void main(String [] args) {
         Hello.hello("world!");
    2013-05-25 14:02:55 dpchrist@desktop ~/sandbox/java/jar
    $ cat libs/com/example/util/Hello.java
    package com.example.util;
    public class Hello {
        public static void hello(String arg) {
         System.out.println("hello, " + arg);
    2013-05-25 14:03:03 dpchrist@desktop ~/sandbox/java/jar
    $ make
    rm -rf bin ext obj
    mkdir obj
    cd libs; javac -d ../obj com/example/util/Hello.java
    mkdir bin
    cd apps; javac -d ../bin -cp ../obj com/example/hello/Console.java
    cd bin; java -cp .:../obj com.example.hello.Console
    hello, world!
    mkdir -p ext/com/example
    cd obj; jar cvf ../ext/com/example/util.jar com/example/util/Hello.class
    added manifest
    adding: com/example/util/Hello.class(in = 566) (out= 357)(deflated 36%)
    cd bin; java -cp .:../ext/com/example/util.jar com.example.hello.Console
    hello, world!
    2013-05-25 14:03:11 dpchrist@desktop ~/sandbox/java/jar
    $ tree -I CVS .
    |-- Makefile
    |-- apps
    |   `-- com
    |       `-- example
    |           `-- hello
    |               `-- Console.java
    |-- bin
    |   `-- com
    |       `-- example
    |           `-- hello
    |               `-- Console.class
    |-- ext
    |   `-- com
    |       `-- example
    |           `-- util.jar
    |-- libs
    |   `-- com
    |       `-- example
    |           `-- util
    |               `-- Hello.java
    `-- obj
        `-- com
            `-- example
                `-- util
                    `-- Hello.class
    19 directories, 6 filesHTH,
    David

  • I am having mac book air 2012model i had installed mavericks and use it, i long press command and power button at a same time and i saw the command prompt, from that i had formated the total hard disk. how to i want to install the OS again ?

    I am having mac book air 2012model i had installed mavericks and use it, i long press command and power button at a same time and i saw the command prompt, from that i had formated the total hard disk. how to i want to install the OS again ?
    i tryed with download mavericks but finally its saying a error message like cant conect to istore like that its saying and every thing is clear like internet and other stuf i tryed with 3times no progress same error pls help.. i bought this lap for my bro with his apple id only we use it now he got a new mac book pro so he gave to me so i formated and use it i use my apple id is that problem come because of changing apple id ? pls eplain

    Firstly, what is the source of the 10.6.4 disc? Is it the original installation disc for your MacBook, or one 'borrowed' from another computer?
    It isn't the retail version, because that's 10.6.3.
    Assuming it's the correct disc (i.e. the one that shipped with your Mac), you need to boot from it again.
    OK the language page.
    From the installer screen, ignore the continue button, go to the menu bar and choose Disk Utility from the Utilities menu.
    In DU, select your internal drive in the sidebar (the top item with the makers name and serial no.).
    Run Repair Disk. If that comes up as disk OK, click the partition tab. Select the partiton from the drop-down above the graphic; 1 partiton is all you need.
    Go to the options button and ensure that the partition scheme is GUID and the file system to Mac OS Extended (Journalled). Name the partiton (usually Macintosh HD), click Apply.
    When the Macintosh HD volume appears below the drive name, quit DU and see if you can then install.
    If the screen after the language screen doesn't show the menu bar, it may be necessary to use another Mac to do the job with the MB in Firewire Target Disc Mode. If it won't boot in TDM, or the MB doesn't have FireWire then it's getting very difficult.

  • Bought a used Mac Mini and can't get past security password Seller refuses to answer emails. is there a keyboard command to take it back to factory settings or do I need to buy a Disc set and OS???

    bought a used Mac Mini and can't get past security password Seller refuses to answer emails. is there a keyboard command to take it back to factory settings or do I need to buy a Disc set and OS???

    You can bypass the password and wipe the drive and return to the original facory installation if the seller included the orginal install DVDs with the Mac mini. If not you will need a retail version of Mac OS X.  To boot from the Install DVD restart the mini, immediately slip in the DVD and press and hold the C key.

  • What are the commands using in SAP ECC 6.0 ehp on SYBASE Database? Backup and restore commands?

    Hi All,
    What are the commands using in SAP ECC 6.0 ehp on SYBASE Database? Backup and restore commands?

    Hi Jayachander,
    Have a look at these sap notes:
    For taking backup: Schedule from DB13 and get the exact command from Logs
    1841993 - SYB: How to schedule backups in DBA Cockpit
    1887068 - SYB: Using external backup and restore with SAP Sybase ASE
    How to restore DB
    1611715 - SYB: How to restore a Sybase ASE database server (Windows)
    Divyanshu

  • IPod is using voice over and won't scroll. What setting did my child click? It will allow me to use voice control, but i need to know what's wrong first so I can give the correct command.

    My daughter's iPod is using voice over and won't scroll. What setting did my child click? It will allow me to use voice control, but i need to know what's wrong first so I can give the correct command.

    VoiceOver is an Accessibility feature while Voice Control allows you to control the Music app via voice.
    To turn off VoiceOver triple click the Home button and go to Settings>General>Accessibility and turn it off. Use three fingers to scroll if necessary.
    iPhone: Configuring accessibility features (including VoiceOver and Zoom)
    iOS: Getting started with VoiceOver for accessibility

Maybe you are looking for