ORA-29278: SMTP transient error: 421 Service not available

imlihj2007發表於2008-01-07

create or replace procedure souchang_Send_Email(p_txt varchar2,
p_sub Varchar2,
p_SendorAddress Varchar2,
p_ReceiverAddress varchar2,
p_EmailServer varchar2,
p_Port Number Default 25,
p_need_smtp Int Default 0,
p_user Varchar2 Default Null,
p_pass Varchar2 Default Null) IS

l_addr Varchar2(200) := '';
l_len Int;
l_ReceiverAddress Varchar2(4000);
procedure p_Email(p_txt varchar2,
p_sub Varchar2,
p_SendorAddress Varchar2,
p_ReceiverAddress varchar2,
p_EmailServer varchar2,
p_Port Number,
p_user Varchar2,
p_pass Varchar2) Is
l_conn UTL_SMTP.CONNECTION;
l_crlf VARCHAR2(2) := CHR(13) || CHR(10);
l_mesg VARCHAR2(4000);

Begin
l_conn := utl_smtp.open_connection(p_EmailServer, p_Port);
utl_smtp.helo(l_conn, p_EmailServer);
If p_need_smtp = 1 Then
utl_smtp.command(l_conn, 'AUTH LOGIN', '');
utl_smtp.command(l_conn,
utl_encode.base64_encode(utl_raw.cast_to_raw(p_user)),
'');
utl_smtp.command(l_conn,
utl_raw.cast_to_varchar2(utl_encode.base64_encode(utl_raw.cast_to_raw(p_pass))),
'');
End If;
utl_smtp.mail(l_conn, p_SendorAddress);
utl_smtp.rcpt(l_conn, p_ReceiverAddress);
l_mesg := 'Content-Type: text/plain; Charset=GB2312' || l_crlf ||
'Date:' || TO_CHAR(SYSDATE, 'yyyy-mm-dd hh24:mi:ss') ||
l_crlf || 'From:' || p_SendorAddress || l_crlf || 'Subject: ' ||
p_sub || l_crlf || 'To: ' || p_ReceiverAddress || l_crlf ||
'Content-Type: text/plain; Charset=GB2312' || l_crlf || '' ||
l_crlf || p_txt || l_crlf;
utl_smtp.data(l_conn, l_mesg);
utl_smtp.quit(l_conn);
Exception
When Others Then
dbms_output.put_line(Sqlcode || ':' || Sqlerrm);

End;

Begin

l_ReceiverAddress := trim(rtrim(replace(Replace(p_ReceiverAddress,
';',
','),
' ',
''),
','));
l_len := length(l_ReceiverAddress);

For i In 1 .. l_len Loop
If substr(l_ReceiverAddress, i, 1) <> ',' Then
l_addr := l_addr || substr(l_ReceiverAddress, i, 1);
Else
dbms_output.put_line();
p_Email(p_txt,
p_sub,
p_SendorAddress,
l_addr,
p_EmailServer,
p_Port,
p_user,
p_pass);
l_addr := '';
End If;
If i = l_len Then
dbms_output.put_line('*');
p_Email(p_txt,
p_sub,
p_SendorAddress,
l_addr,
p_EmailServer,
p_Port,
p_user,
p_pass);
End If;
End Loop;

END;

I can't find the solution to this error,but same export reply :

Go to Control Panel->Add or Remove Programs->Click on
Add/Remove Wndows Components
Check IIS check box.
Select Internet Information Service (IIS) option and click on Details button
Check whether SMTP Service is checked or not.
If not selected then select SMTP check box.

This process should be done on server.
It will help out from ORA-29278: SMTP transient error: 421 Service not available problem.

my cumputer does not install the iss services and smtp services

have any other solution to it

any others:

whe .com can be opend but can't ping the ip opend

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9879835/viewspace-996818/,如需轉載,請註明出處,否則將追究法律責任。

相關文章