Mail from Oracle procedure [message #315350] |
Mon, 21 April 2008 04:46 |
gajini
Messages: 262 Registered: January 2006
|
Senior Member |
|
|
Hi,
When i try to send the mail from Oracle procedure using procedure,I'm getting the following error,
SQL> exec send_mail_rahul('mit@ggn.com','mit@ggn.com','message');
BEGIN send_mail('mit@ggn.com','mit@ggn.com','message'); END;
*
ERROR at line 1:
ORA-29279: SMTP permanent error: 554 alpm01.e2k.ggn.com
ORA-06512: at "SYS.UTL_SMTP", line 17
ORA-06512: at "SYS.UTL_SMTP", line 98
ORA-06512: at "SYS.UTL_SMTP", line 138
ORA-06512: at "CW.SEND_MAIL", line 8
ORA-06512: at line 1
Please find the procedure written for the same,
CREATE OR REPLACE PROCEDURE send_mail(p_sender IN VARCHAR2,
p_recipient IN VARCHAR2,
p_message IN VARCHAR2)
as
l_mailhost VARCHAR2(255) := 'alpm01.e2k.ggn.com';
l_mail_conn utl_smtp.connection;
BEGIN
l_mail_conn := utl_smtp.open_connection(l_mailhost,25);
utl_smtp.helo(l_mail_conn, l_mailhost);
utl_smtp.mail(l_mail_conn, p_sender);
utl_smtp.rcpt(l_mail_conn, p_recipient);
utl_smtp.open_data(l_mail_conn );
utl_smtp.write_data(l_mail_conn, p_message);
utl_smtp.close_data(l_mail_conn );
utl_smtp.quit(l_mail_conn);
end;
Kindly help me to resolve this error.Note: This mail server is working fine and SMTP is opened on port 25 only.
Thanks...
|
|
|
|
Re: Mail from Oracle procedure [message #315364 is a reply to message #315350] |
Mon, 21 April 2008 05:22 |
ThomasG
Messages: 3212 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
Quote: |
SMTP Error - 554
Transaction failed
This is a generic response returned by the server if an SMTP transaction failed. This response is typically returned if too many errors were received in processing.
|
So the SMTP server seems to be of a different opinion regarding that 'working fine'.
Check the SMTP server logs.
|
|
|
|
Re: Mail from Oracle procedure [message #315484 is a reply to message #315350] |
Mon, 21 April 2008 12:59 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
In some/many/most cases changes to the SMTP server are required so it will accept & forward messages from the Oracle DB server systems;
because many default SMTP configurations treat such messages as spam & refuse to process them.
|
|
|