Re: [Q] wield send mail from ORACLE ???

  • From: Cristian Chelemen <cristian_chelemen@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 24 Apr 2007 07:33:41 -0700 (PDT)

Dear DBA1MCC,
   
  I encountered almost the same error when the mail server went down. The "421" 
error code means that the <domain> Service is not available and it will be 
closing the transmission channel (This may be a reply to any command if the 
service knows it must shut down.). If you know that you don't have a permanent 
problem with the mail server you should increase the transfer time-out variable 
(vn$tx_timeout in my example) in UTL_SMTP.OPEN_CONNECTION function and after 
that you should check if you can proceed with the mail procedure. You should 
define a variable smtp$verify as UTL_SMTP.REPLY and then check if this reply 
code is "220" (<domain> Service is ready) smtp$verify := 
UTL_SMTP.OPEN_CONNECTION(vv$mail_server, vn$mail_port, smtp$conn, 
vn$tx_timeout). Personaly, I gave the vn$tx_timeout the value of 100 seconds.
  
 
  Cristian Chelemen

dba1 mcc <mccdba1@xxxxxxxxx> wrote:
  We have ORACLE 9.2.0.8 and 10.2.0.2 on Redhat servers
(4.3). I tried to send mail from ORACLE (we use
utl_smtp.data( conn, mesg );). We always get one time
work, second time fail repeatly. Does any one know
why?? 

===============================================
SQL> @mailbody
32 .
SQL> /

PL/SQL procedure successfully completed.

SQL> /
Declare
*
ERROR at line 1:
ORA-29278: SMTP transient error: 421 Service not
available
ORA-06512: at "SYS.UTL_SMTP", line 17
ORA-06512: at "SYS.UTL_SMTP", line 96
ORA-06512: at "SYS.UTL_SMTP", line 138
ORA-06512: at line 15


SQL> /

PL/SQL procedure successfully completed.

SQL> /
Declare
*
ERROR at line 1:
ORA-29278: SMTP transient error: 421 Service not
available
ORA-06512: at "SYS.UTL_SMTP", line 17
ORA-06512: at "SYS.UTL_SMTP", line 96
ORA-06512: at "SYS.UTL_SMTP", line 138
ORA-06512: at line 15


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
--
//www.freelists.org/webpage/oracle-l




       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

Other related posts: