Bonjour
Je suis en Oracle9i Windows2000 le but est d'envoyer des mail par un procedure PL/sql j'utilse le code suivant:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 
CREATE OR REPLACE procedure send_mail( 
p_exp IN OUT varchar2, 
p_dest IN OUT varchar2, 
p_obj IN OUT varchar2, 
p_msg IN OUT varchar2) 
is 
v_cnx utl_smtp.connection; 
v_smtp_srv varchar2(200):='172.18.0.2'; 
v_port pls_integer:=25; 
v_msg varchar2(2000); 
BEGIN 
v_cnx:=utl_smtp.open_connection(v_smtp_srv,v_port); 
utl_smtp.HELO(v_cnx,v_smtp_srv); 
utl_smtp.MAIL(v_cnx,p_exp); 
utl_smtp.RCPT(v_cnx,p_dest); 
v_msg:='date:'||TO_CHAR(sysdate,'dd mon yyyy hh24:mi:ss')||utl_tcp.CRLF|| 
'from:'||p_exp||utl_tcp.CRLF|| 
'subject:'||p_obj||utl_tcp.CRLF|| 
'to:'||p_dest||utl_tcp.CRLF|| 
''||utl_tcp.CRLF|| 
p_msg||utl_tcp.CRLF||''; 
 
utl_smtp.data(v_cnx,v_msg); 
utl_smtp.quit(v_cnx); 
 
EXCEPTION 
WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN 
  utl_smtp.quit(v_cnx); 
  raise_application_error(-20000,'Erreur send_mail:'||sqlerrm); 
 END; 
/
est j'ai l'erreur :


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---------------------------
Error
---------------------------
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 374
ORA-06512: at "SYSTEM.SEND_MAIL", line 28
ORA-29278: SMTP transient error: 421 Service not available
ORA-06512: at line 3
 
View program sources of error stack?
---------------------------
Oui   Non   
---------------------------
merci de votre aide
[/quote]