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)
l_mailhost VARCHAR2(255) := '220.127.116.11';
crlf varchar2(2):= CHR(13)||CHR(10);
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;
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.
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