-
Mail from Oracle procedure
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...
-
Hi
Try telnetting to 'alpm01.e2k.ggn.com' on port 25 and send a mail manually.
see if the server responds first
regards
Hrishy
-
Hi Hrishy,
I tried to telnet it from my Oracle server,but it's giving the following error,
$ telnet alpm01.e2k.ggn.com 25
Trying...
Connected to 3.159.1.38.
Escape character is '^]'.
554 alpm01.e2k.ggn.com
Connection closed.
I can ping it from my Oracle server,
$ ping alpm01.e2k.ggn.com
PING alpm01.e2k.ggn.com : (3.159.1.38): 56 data bytes
64 bytes from 3.159.1.38: icmp_seq=0 ttl=56 time=298 ms
64 bytes from 3.159.1.38: icmp_seq=1 ttl=56 time=297 ms
64 bytes from 3.159.1.38: icmp_seq=2 ttl=56 time=301 ms
What could be the reason for this problem?Do i've to set anything in SMTP server?Please help to resolve this problem...
Thanks...
-
look at the error the smtp server is returning to you
also do as hrishy says, send a mail manually by connecting to the smtp server
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|