DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: the proc is not working

  1. #1
    Join Date
    Oct 2003
    Posts
    312

    the proc is not working

    The below procedure is valid; however, when I execute the proc it ran but I didn't get the from sender to the recepient nor messsage, it's an empty email.

    Any advises???

    CREATE OR REPLACE PROCEDURE TEST.SEND_MAIL_TEMP (v_sender IN VARCHAR2,
    v_recipient IN VARCHAR2,
    v_subject IN VARCHAR2,
    v_message IN VARCHAR2)
    as
    l_mailhost VARCHAR2(30) := '111.11.1111';
    l_mail_conn utl_smtp.connection;
    crlf varchar2(2):= CHR(13)||CHR(10);
    mesg varchar2(4000);
    BEGIN
    l_mail_conn := utl_smtp.open_connection(l_mailhost, 25);
    mesg := 'Date: '||to_char(sysdate,'dd Mon yy hh24:mi:ss' )||crlf
    ||'FROM: '|| v_SENDER||' >'||crlf||'Subject: '||v_SUBJECT|| crlf ||'To: '
    || v_RECIPIENT || crlf ||''|| crlf || v_message;
    utl_smtp.helo(l_mail_conn, l_mailhost);
    utl_smtp.mail(l_mail_conn, v_sender);
    utl_smtp.rcpt(l_mail_conn, v_recipient);
    utl_smtp.data(l_mail_conn, v_message);
    -- utl_smtp.write_data(l_mail_conn, v_message);
    -- utl_smtp.close_data(l_mail_conn );
    utl_smtp.quit(l_mail_conn);
    end
    ;
    /

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    just wondering, is the mailhost an ip address of 3 masks...?

  3. #3
    Join Date
    Oct 2003
    Posts
    312
    Pando,

    the mail host is not an issue, what you see is just a dummy number I have. Any way, I still get the email after the rpocedure is executed; however, it's nothing on the email.

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    STFW. I see about 20 examples of this every day.
    Jeff Hunter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width