ORA-29278 - SMTP Error

Dicas do Oracle Forms Builder - Blocos, Itens, LOV, Canvas, Triggers, comandos, PLL, d2kwutil, FMB, Alert, menus, etc
Post Reply
rafaellomba
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 21
Joined: Tue, 14 Aug 2007 9:39 am
Location: Rio de Janeiro - RJ
Rafael Lomba

Hello everyone,

I'm doing a forms to send email, and it causes this error, ORA-29278. I researched the internet and the only thing I found was "Transient Error of SMTP: 421 Service Not available". What would this error be? That the SMTP server was not found?

Select all

PROCEDURE ENVIA_EMAIL(p_mailhost  IN VARCHAR2,  
                     p_sender    IN VARCHAR2,  
                     p_recipient IN VARCHAR2,  
                     p_subject   IN VARCHAR2,  
                     p_message   IN VARCHAR2 ) IS  
 
       mail_conn UTL_SMTP.CONNECTION;  
 
       crlf VARCHAR2( 2 ) := CHR( 13 ) || CHR( 10 );  
       mesg VARCHAR2( 5000 );  
BEGIN  
  mail_conn := UTL_SMTP.OPEN_CONNECTION( p_mailhost, 25 );  
  mesg:= 'Date: ' || TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' ) || crlf ||  
         'From: <' || p_sender || '>' || crlf ||  
         'Subject: ' || p_subject || crlf ||  
         'To: ' || p_recipient  || crlf || ''  || crlf ||  p_message;  
  UTL_SMTP.HELO( mail_conn, p_mailhost ); 
  
--esse trecho foi um código de autenticação que eu achei na internet, não sei se está certo. 
 
  utl_smtp.command (mail_conn, 'AUTH LOGIN'); 
utl_smtp.command (mail_conn,utl_raw.cast_to_varchar2(utl_encode.base64_encode(utl_raw.cast_to_raw('usuario')))); 
utl_smtp.command (mail_conn,utl_raw.cast_to_varchar2(utl_encode.base64_encode(utl_raw.cast_to_raw('senha')))); 
 
--fim do trecho de autenticação 
 
  UTL_SMTP.MAIL( mail_conn, p_sender );  
  UTL_SMTP.RCPT( mail_conn, p_recipient);  
  UTL_SMTP.DATA( mail_conn, mesg );  
  UTL_SMTP.QUIT( mail_conn ); 
END;
I hope someone can help me.

From now on, thank you.
User avatar
stcoutinho
Moderador
Moderador
Posts: 850
Joined: Wed, 11 May 2011 5:15 pm
Location: são Paulo - SP

Hello Rafaellomba,

I am responding to this old topic still open, in the case of other forists to come across this problem.

There is a note in Metalink that apparently treats this problem:

Select all

ORA-29278: SMTP transient error: 421 Service not available” When Using UTL_SMTP to Send Email [ID 604763.1] 
Other links that mention this problem:

1]] http://www.dba-oracle.com/sf_ora_29278_ ... ng_bc1.htm https://community.oracle.com/thread/288893

Hugs,

Sergio Coutinho
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests