ORA-20000: Unable to send mail: ORA-29278: SMTP transient error: 421 Service not available [message #589817] |
Thu, 11 July 2013 01:39  |
 |
shanker86
Messages: 5 Registered: July 2013 Location: KL,MALAYSIA
|
Junior Member |

|
|
i want do email notification. i create procedure without error. when i declare i gettingt error.
please help me on this.
procedure
CREATE OR REPLACE PROCEDURE send_mail (p_to IN VARCHAR2,
p_from IN VARCHAR2,
p_message IN VARCHAR2,
p_smtp_host IN VARCHAR2,
p_smtp_port IN NUMBER DEFAULT 25)
AS
l_mail_conn UTL_SMTP.connection;
BEGIN
l_mail_conn := UTL_SMTP.open_connection (p_smtp_host, '25');
UTL_SMTP.helo (l_mail_conn, p_smtp_host);
UTL_SMTP.mail (l_mail_conn, p_from);
UTL_SMTP.rcpt (l_mail_conn, p_to);
UTL_SMTP.data (l_mail_conn, p_message || UTL_TCP.crlf || UTL_TCP.crlf);
UTL_SMTP.quit (l_mail_conn);
EXCEPTION
WHEN UTL_SMTP.Transient_Error OR UTL_SMTP.Permanent_Error
THEN
raise_application_error (-20000, 'Unable to send mail: ' || SQLERRM);
END;
/
*********************************************************************************
DECLARE
P_TO VARCHAR2(32767);
P_FROM VARCHAR2(32767);
P_MESSAGE VARCHAR2(32767);
P_SMTP_HOST VARCHAR2(32767);
P_SMTP_PORT NUMBER;
BEGIN
P_TO := 'shanker.tamarasan@allianz.com.my';
P_FROM := 'cits.support@allianz.com.my';
P_MESSAGE := 'Test Email';
P_SMTP_HOST := 'mail.allianz.com.my';
P_SMTP_PORT := 25;
SEND_MAIL ( P_TO, P_FROM, P_MESSAGE, P_SMTP_HOST, P_SMTP_PORT );
COMMIT;
END;
/
i getting below error:
ORA-20000: Unable to send mail: ORA-29278: SMTP transient error: 421 Service not available
ORA-06512: at "CUSTOMER.SEND_MAIL", line 18
ORA-06512: at line 15
please help....
|
|
|
|
|
|
|
|
|