ORA-20002 Unable to relay
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: ORA-20002 Unable to relay

Hybrid View

  1. #1
    Join Date
    Sep 2002
    Posts
    411
    Hi all,

    I have this send_mail procedure:

    CREATE OR REPLACE PROCEDURE LIS.send_mail (v_sender IN VARCHAR2,
    v_recipient IN VARCHAR2,
    v_subject IN VARCHAR2,
    v_message IN VARCHAR2)
    as
    l_mailhost VARCHAR2(255) := '111.11.1.111';
    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,mesg);
    --utl_smtp.write_data(l_mail_conn, v_message);
    --utl_smtp.close_data(l_mail_conn );
    utl_smtp.quit(l_mail_conn);
    end;
    /


    it's been working fine for the last couple of months and all the sudden it stops working. We have not changed anything on the mail server, nor the database. The Ipaddress of the mail server is correct. I could not think of anything else why this procedure is not working and I got the above errors.

    any advise???

    thanks

  2. #2
    Join Date
    Jul 2001
    Location
    Bangalore
    Posts
    33
    ora 20002 is a user defined error. I suspect this might be because of some configuration changes made to the system. Try to verify once again if anything has been changed over the last few days

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