Home » Developer & Programmer » Forms » SMTP permanent error: 554 Recipient Rejected: Relay access denied
SMTP permanent error: 554 Recipient Rejected: Relay access denied [message #112187] Wed, 23 March 2005 09:36 Go to next message
fanni
Messages: 96
Registered: March 2004
Member
Hi I am trying to send e mail from plsql.

172.172.100.16 is the address of machine running the winproxy server. Our OutLook Express has following (172.172.100.16)address in outgoing and incoming server. I am using a client machine (172.172.100.5)

When i call the procedure mentioned below
----------------
1 create or replace
2 PROCEDURE send_mail (p_sender IN VARCHAR2,
3 p_recipient IN VARCHAR2,
4 p_message IN VARCHAR2)
5 as
6 l_mailhost VARCHAR2(255) := '172.172.100.16';
7 l_mail_conn utl_smtp.connection;
8 BEGIN
9 l_mail_conn := utl_smtp.open_connection(l_mailhost, 25);
10 utl_smtp.helo(l_mail_conn, l_mailhost);
11 utl_smtp.mail(l_mail_conn, p_sender);
12 utl_smtp.rcpt(l_mail_conn, p_recipient);
13 utl_smtp.open_data(l_mail_conn );
14 utl_smtp.write_data(l_mail_conn, p_message);
15 utl_smtp.close_data(l_mail_conn );
16 utl_smtp.quit(l_mail_conn);
17* end;
SQL> /

Procedure created.
----------------

send_mail( 'farhan@oracle.com',
'ashraf@oracle.com',
'Hello Daddy' );
It gives the following errors

ERROR at line 1:
ORA-29279: SMTP permanent error: 554 Recipient Rejected: Relay access denied
ORA-06512: at "SYS.UTL_SMTP", line 17
ORA-06512: at "SYS.UTL_SMTP", line 98
ORA-06512: at "SYS.UTL_SMTP", line 240
ORA-06512: at "SCOTT.SEND_MAIL", line 11
ORA-06512: at line 2




I have checked my mail server through this code.
--------------------------
1 declare
2 c utl_smtp.connection;
3 r utl_smtp.reply;
4 begin
5 c := utl_smtp.open_connection('172.172.100.16', 25);
6 utl_smtp.helo(c,'172.172.100.16');
7* end;
8 /

PL/SQL procedure successfully completed.

--------------------------
It seems that mail server address is correct but receipient address has some problem.I have also debugged the application
utl_smtp.rcpt() This call gives the error.

Please help me to get rid offfffffffffff.
regards
Farhan









Re: SMTP permanent error: 554 Recipient Rejected: Relay access denied [message #112276 is a reply to message #112187] Thu, 24 March 2005 01:21 Go to previous message
Frank
Messages: 7901
Registered: March 2000
Senior Member
This is not really a Forms-question, but ok.
Is your mailserver on the oracle.com network? Is your mailaddress indeed farhan@oracle.com?
"Relay access denied" means your mailserver did not accept your request to send out your mail; nothing to do with your code, but with the mail-addresses you provided.
Most mailservers accept only mails that are either FROM a mailaddress from their network (in this case oracle.com) or TO a mailaddress from their network (in this case oracle.com). If not, it is called an open relay (google for that and you will understand).

hth
Previous Topic: empty value in the list item
Next Topic: Making Calendar
Goto Forum:
  


Current Time: Mon Dec 30 11:37:53 CST 2024