6 Replies Latest reply on Oct 15, 2013 8:29 PM by HPSQLDEVELOPER

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

    774875
      Hi,

      I'm intermittently hitting
      ORA-29278: SMTP transient error: 421 Service not available 
      on
      DB Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
      Please let me know if additional information is required.

      Any insights would be appreciated.

      Thanks,
      CJM
        • 2. Re: ORA-29278: SMTP transient error: 421 Service not available
          774875
          Hello Robert,

          I checked out the thread, but what I'm facing is a intermittent problem. Sometimes the utl_smtp call works, and other times it doesn't.

          Thanks,
          CJM
          • 3. Re: ORA-29278: SMTP transient error: 421 Service not available
            JustinCave
            Assuming that you're always connecting to the same SMTP server, that implies that the SMTP server is intermittently down or unreachable (at least on the port you're using). Most likely, that would be an issue to address to the mail server admin though it could be an intermittent network issue.

            Justin
            • 4. Re: ORA-29278: SMTP transient error: 421 Service not available
              Yahoo!
              hi
              am also facing same problem.

              procedure is
              CREATE OR REPLACE PROCEDURE send_mail (p_to        IN VARCHAR2,
                                                     p_from      IN VARCHAR2,
                                                     p_message   IN VARCHAR2)
              AS
                l_mail_conn   UTL_SMTP.connection;
                l_reply utl_smtp.reply;
                l_smtp_host VARCHAR2(50) := 'smtp.gmail.com:25';
                l_smtp_port NUMBER := 25;  
              BEGIN
                l_mail_conn := UTL_SMTP.open_connection(l_smtp_host, l_smtp_port);
                utl_smtp.EHLO(l_mail_conn, l_smtp_host);
                utl_smtp.command(l_mail_conn, 'AUTH LOGIN');
                utl_smtp.command(l_mail_conn, utl_raw.cast_to_varchar2(utl_encode.base64_encode(utl_raw.cast_to_raw('mymail@gmail.com'))));
                utl_smtp.command(l_mail_conn, utl_raw.cast_to_varchar2(utl_encode.base64_encode(utl_raw.cast_to_raw('mypwd'))));
                l_reply :=UTL_SMTP.mail(l_mail_conn, p_from);
                dbms_output.put_line( l_reply.code || ' ' || l_reply.text );
                UTL_SMTP.rcpt(l_mail_conn, p_to);
                UTL_SMTP.write_data(l_mail_conn, p_message || UTL_TCP.crlf || UTL_TCP.crlf);
                UTL_SMTP.quit(l_mail_conn);
              END;
              /
              am calling as follows
              declare
               conn        utl_smtp.connection;
               smtp_domain VARCHAR2(256) := null;
               BEGIN
               utl_smtp.command(conn,'STARTTLS');
               utl_smtp.helo(conn, smtp_domain);
                 send_mail(p_to        => 'mymail@gmail.com',
                           p_from      => 'mymail@gmail.com',
                           p_message   => 'can i get message.');
               END;
               /
              and getting the error
              ORA-29278: SMTP transient error: 421 Service not available
              ORA-06512: at "SYS.UTL_SMTP", line 21
              ORA-06512: at "SYS.UTL_SMTP", line 97
              ORA-06512: at "SYS.UTL_SMTP", line 159
              ORA-06512: at line 5
              i have checked in control panel that IIS is installed and SMTP is also setup.
              i am able to ping SMTP HOST thro' TELNET

              and i have changed the SMTP_OUT_SERVER parameter like
              ALTER SYSTEM SET SMTP_OUT_SERVER= 'smtp.gmail.com:25' scope = both
              am not getting any clue. is it because of using GMAIL server?

              oracle version 10g and Windows is XP - SP3

              thank you for any help

              Regards
              Karthik
              • 5. Re: ORA-29278: SMTP transient error: 421 Service not available
                user10527641
                what worked for me is to change this code:
                V_mail_conn := UTL_SMTP.open_connection ('smtp.ufl.edu', 25);
                UTL_SMTP.helo (V_mail_conn, 'smtp.ufl.edu');
                to this code:
                V_mail_conn := UTL_SMTP.open_connection ('localhost', 25);
                UTL_SMTP.helo (V_mail_conn, 'localhost');

                evidently if the smtp is busy there is no queueing but there is with local
                • 6. Re: ORA-29278: SMTP transient error: 421 Service not available
                  HPSQLDEVELOPER

                  Hello Friend,

                   

                  When we try to attach file by using UTL_SMTP function and file size is larger , then also the SMTP connection goes down and database too , it   also generate same type of error.

                   

                  Thanks,

                  HPDBA