5 Replies Latest reply: May 15, 2012 11:58 AM by Udo RSS

    ora-29279: SMTP permanent error Unbalanced '>' XE

    900384
      Dear Sirs

      Sorry for my bad english, I'm not from USA; I have a problem when I send email in Oracle Express Aplication Release 11.2.0.2.0, I get this mistake ora-29279: SMTP permanent error <arivera@assa.com.ec... Unbalanced '>' and I don`t know what happen. I configure UTL_MAIL in this way:

      *********************************************************************************
      [host@oracle]$ cd $ORACLE_HOME/rdbms/admin
      [host@oracle]$sqlplus / as sysdba
      SQL> @utlmail
      SQL> @utlsmtp
      SQL> @prvtmail.plb
      SQL> GRANT EXECUTE ON utl_mail TO PUBLIC;
      SQL> GRANT EXECUTE ON utl_smtp TO PUBLIC;
      SQL> alter system set smtp_out_server='192.168.170.10' scope=both;
      ACL: Access Control List

      in White Horses Blog

      Create ACL and privileges

      Now first create an ACL as SYS (or any other user with DBMS_NETWORK_ACL_ADMIN execute granted), this will hold the privileges. You can add as many privileges as you like to this file, but I would recommend to split privileges in the ACL to specific tasks or users. You must create an ACL with at least one privilege, so lets start with the ‘connect’ privilege for user ASSA, (also a role can be added as principal):

      begin
      dbms_network_acl_admin.create_acl (
      acl => 'utl_mail.xml',
      description => 'Allow mail to be send',
      principal => 'ASSA',
      is_grant => TRUE,
      privilege => 'connect'
      );
      commit;
      end;
      Add Privilege

      Great, now that the ACL is created, you can add more privileges like the ‘resolve’ privilege:

      begin
      dbms_network_acl_admin.add_privilege (
      acl => 'utl_mail.xml',
      principal => 'ASSA',
      is_grant => TRUE,
      privilege => 'resolve'
      );
      commit;
      end;
      Assign ACL

      Cool, you granted ASSA to connect and resolve, but you have not defined to which resources he is allowed to connect:

      begin
      dbms_network_acl_admin.assign_acl(
      acl => 'utl_mail.xml',
      host => '192.160.170.10'
      );
      commit;
      end;

      ***********************************************************************************

      I configured utl_mail in other computer at the first time, in virtual machine, in a server, with windows server 2000 and it's working without problems.
      The problem is in this computer, with windows xp. I can`t send emails despite configuring UTL_MAIL.

      Danny Lima
      Ecuador
        • 1. Re: ora-29279: SMTP permanent error Unbalanced '>' XE
          Udo
          Hello Danny,

          please provide the full error stack for your ORA-29279. It'll usually contain hints on what is actually going wrong in your SMTP connection.
          You can change your mail address and mail host to something fictitious, but make sure it's different hostnames etc. when it is different hostnames in your actual case.

          But perhaps its easy to be solved. You have
          SQL> alter system set smtp_out_server='192.168.170.10' scope=both;
          And
          begin
          dbms_network_acl_admin.assign_acl(
          acl => 'utl_mail.xml',
          host => '192.160.170.10'
          );
          commit;
          end;
          The IP Adress in the ACL differs from the one you've entered for your SMTP server. Delete that ACL and create one like
          begin
          dbms_network_acl_admin.assign_acl(
          acl => 'utl_mail.xml',
          host => '192.168.170.10'
          );
          commit;
          end;
          and with a bit of luck it starts working.

          Otherwhise, please provide the additional information described above.

          Thanks,

          Udo
          • 2. Re: ora-29279: SMTP permanent error Unbalanced '>' XE
            900384
            Hi Udo

            Sorry I was wrong, the code is:



            begin
            dbms_network_acl_admin.assign_acl(
            acl => 'utl_mail.xml',
            host => '192.168.170.10'
            );
            commit;
            end;


            and

            SQL> alter system set smtp_out_server='192.168.170.10' scope=both;

            I have copied the wrong way.

            I know that it works, because i can send emails in sql commands:

            begin
            utl_mail.send(sender => 'dlima@datasierra.com.ec',
            recipients => 'dlima@datasierra.com.ec',
            subject => 'DATASIERRA PQR-CRM',
            message => 'Prueba');
            end;

            that's works in the sql commands in SQL Workshop or plsql, the problem is in the aplication in the trigger that have the same code utl_mail.

            My full error stack is:

            ORA-29279: SMTP permanent error: 553 5.0.0 <arivera@assa.com.ec... Unbalanced '<'
            ORA-06512: at "SYS.UTL_MAIL", line 654
            ORA-06512: at "SYS.UTL_MAIL", line 671
            ORA-06512: at "ASSA.AUTO", line 93
            ORA-04088: error during execution of trigger 'ASSA.AUTO' ----------> that's is my trigger
            View program sources of error stack?

            CREATE OR REPLACE PACKAGE BODY SYS.utl_mail wrapped
            a000000
            1
            abcd
            abcd
            abcd
            abcd
            abcd
            abcd
            abcd
            abcd
            abcd
            abcd
            abcd
            abcd
            abcd
            abcd
            abcd
            b
            5526 1483
            NIHHPv5srlQQXqbfvADuEZulNIUwg81xEiCGU/O7mvmONPaZk1QFmDO84lLx5qfegACTm6Gb
            yR2OLzSTmpBtFNx5sFOmOqVsPvR2IhTZ0GIj3Ygx2+iF7keleGruuDRexnOziAsh5wd4fd4S
            nBlynL+Fbf2yRvETPmAIFFjof0oi7hbctps2bP/dxhZ2a67cXYetzGQ6vAUD+CWp3gRsoNrx
            OVlzV4GsNtBSd7C2zjh83GRLgtvMe5tLJKLSQ0A1blf7WNUeGP/RUAf+iT96/eQdmKF7gUtt
            Xixbhl2XaLVV/YNP5HQVk3z1Uf2zbcdVErWv6BA73zDt/fmPMxlMGu3EjNDOkOsQ2n3tELVS
            pTzgdLdPqBytgiQ402b5Bnc344mfuxB/SI90Xkmrcht10ubOA22w9B85idfeXV9JShHvNjQa
            vVugaZj+xBkH4pDM2RbJJIyTjyU1EV+39QYwP3u4rKlHGQ7P6VdY6fucWNFWeUBzUyJF7Sy0
            xcultJlUxAT4olWF7C9ZVjx92YLCh4er5idFylLTKoLyO0jZmd2AmZOfmPbZ71YhDM/UsJXs
            9OLmAqg8IhgVvTpOKZaOv6J6PDAQAu9ZRp5k1jFdNMaJrwE2FE2OVwQzbOk+JHEgPwT5VxPo
            A4+wk3WPOPKNsxTgaRlGBn0gxi7nEn/cyLZoGkhorKyID7lcjoRln69WRvS3O/SZW57rwo0m
            vReqY2JdECTrynZJkwR5ymAJCInYnHjbPrdudfJ9C0nIqMq/qOMcrT9f+DqCg1DXJFBYhcZH
            xSbhzeSvgY2AR50pa8czd+irT9+eVb71aUrvm2QCNG+XUkHXf2aE+yjf8uK4yiGuT5jjVAj+
            p5JN7EKSFT9HxrXrIUHLm1DVZhThjKyoWG/IiAc22/v5bnylpVvyndRISlw/txFA/pCAzHbM
            1ek4mb7fRRQKY71Y7yWC8dWD/3I6oJycskzaOsCza/Uyx8HVTZ3uXZGY2GVZ/FBu7nwVUmga
            ql6abSa3gO5Ws2KeRVffH6Rm2hJwlpvc2/NyW8nHzFdJ93jz68er0vf6UqVBYpENkiuzT+IC
            4j/UZhK9/aY2RdsEaROT1n1yrev4A2OF2raRC1eZiN0Sq/qTKyJp2D+yzPSJwTJGiTqNk2Kp
            juPGPGNsHOz6py889TmzdJrBS2uMXwVEB6jLaMi0FIAlUKFukLrWTC1z4cGj9Q4S4F1xv3FJ
            3CUUjrcm2nTNdX93+pzgq/N266bVICD8E/HykDQXCbRhTAzSUSSN7DTBG4AZCtP7QsDfW9xf
            JDTVdQvrPOwhmZn2JwVNfr5JbMN+bmMeUDZfrjS9/wtehTRMSVO0+MYaMoojFFCy8VOIvusU
            Io7HwOpg8jwdvYbTSfIJJPUM5r1L1wfi2m38MvDtcFlwoRchNt8gEiwkz6AKU9V+pycLdcl7
            V4nyRqEwBC9AypDtJl2Y863LLrLT87WJlc8qbPHSAx+Wk0bYj0TI9uYlNt8y2BcfuKah50/P
            VrPnKW5G0yGOVDQ+ccCkU/T/4BmKaLFVvsA5KwwmgUprn93yK2nZGgyGJrtsKs1jOSBf/PN3
            BK19xShzCwlvVe2VxrzzWQHuWwRUoqjK4MjeBFEH05+sWLtt4wWmIrijN3TIU4RBwmLmL++K
            8n1aot1/FrbyF8ZtzC8bX3liwpbzzBlwMuy4PH4Z5FkXDhcDhJDs1PpXNQkUCfpfaOSbFeHj
            25CfaIUss3JvwpJpZfNVlwccgj8Z0kPBaLWphh4iS3DGTCPjjYZWeRlWGj0qaFGboDYsnw9r
            RiS2H7guMk2mWIVRMqfkQPMrz6MiC5nNR0x9Zg0CBlrSSiFgFO2Xz50JgW77DODtnpcbT+g1
            iAnrdYJmWPDKwQZl5/2JkRHgxpvn619wGIwWX5I5/42JNSpo8kdRGezeGIMLj8uY1bZEQfgM
            w4HNaaORbvWAQIMqzIcCHu1SRSzy/bBb3gsgqezuOi7dQsohv+FeHzV5+iQdc30gqZKBAJi5
            q8NNusHe0ExSnOX1So0UWp9QNi28OEF298HBaal6wR+th19jE3RB6il4GrYNzyeMDvPaTSNv
            764xE3o4YjM95NBXwKcCrJ7pwu0zumY3Nt9eNZ5IGiei7EIb8BYIWeA07KfVSgKUhjqPbwTZ
            sYTr+txlZEXyhZkoEGMi5RzSl9y3YctM/0toZ36gLeu9FswPOqZNBvyladf+9Hn0ST5cAZw+
            CrxAjhhhI+fVsfez4QzAjSVwC6snqwLRHP9mR/HBihs8stb3eEgV9nHbZX2blUiBTKdT6wE5
            k1//IEJ5QYDTFAM0wsAZR07mk1uxv8l/p5aYmxKRQwkKepVdQLf0XkK1Q0DbC+ozBAavflZM
            g5S/vjoCdfVSNtGAbPAJ1o2Og1YajcPq9dkqsVZWV7z02pWVFguWnnadah9/jIPDgfYdcHjb
            XBNhdKaPJUP9XVPWJEl0rvwYTlvCxpfDlsutl25iCmywpQP5nNvNl/lahB2YM5sb12Znw72/
            ul+OrQ9qHWHFm9HFX9QKSAqfkXGiRPzT59F9a449yNk04wEJ3bcX7rZ3jQ4vH9X7SUiTF/xl
            UP+aTH0epktQ0n4uN9NcRTlGSjiyBJF9zlmPfLLJt/sC4vR078JyZt0CqYmJXLRiiSFTCTZU
            u8zCy6Ucwxmfzqdqbl8aUiXFQi8njHciY+mIyxtS8mjN9af1hSThGKZ4O9dzM39VVjy1k9h4
            Eb41Ts38P0LanZgSyRS8+Pi/b8MHZV7GshfbvvM2dmWxBvlS+Nj/yo4inu9RvZbIF3ZC8/vH
            sO/EksvewyUWyRtomDrryTf5frOk6wv9+YgxTmOxuaW0l9tTcMPDkWnsIWJe1keGJ+1Eoldx
            FvRKAdmvInqUE+JmCr8IdXoM7Rtz1u9pbLhnTBhT3HtuQB6XFz2EEXSRZluzhR7dSlF/qO4U
            Ys/aGEB4rz7VIwqAagSP3O+WXzRdYHzh5o6GoPrBFDLx21JkVH8xOLi44pSrGpW0t9LyNw5b
            12DeMPsqi+bUemHFzQBmN1mPWaXuuE+SeNig2DwlUC/fJHbZUpCD8RvoS9xI95KRhqDC0Rwp
            mziUXKNNZqu5bawi01M5CRVGJblQK4pvDUDb4ylYvYht10UgtG+9ruqtOjBf8tTdhSIdw3ub
            kFIxO4ccDd0jJI30NHT3j26ndr1O5iH0Z9a9uKYOfKcjqdFCM4wWqy6lkaOvEi85U37CeJWv
            AkU4UYspLvoQq9kS69wxqRWglS/pLOkHcRC8lg/HE32ZJBmAEpUuwCNpDmaysFfdaqSwpBz6
            Tf+wXYp0a2eM4uA+6TIJn47qaGlcJ1yok1YQmnF1SZURPZ3l/5dicLFhWIN/fyg0VI2kQMAO
            FPtAqFlcrokJlu62wBPJuanin8UrLJ4FBkZnuVZkoYvDk2ZiFPaENIzC5ps7awfRdML2+gmn
            Xtg0Be9HG4d8akO+TIYIw5XECdyhA6zUuJD2/J74OLfVLUQC+oFqmCWHS9VWTDaHaqcvNhDK
            ONwmmuICcZ9Rx9nwyNqOo/nqzzBCa/e52W0e/Fgb8ri4fJU38gnXWSGVMN45cPNxsFYtG/Un
            kAPIusWeYuMBLXhkiFa6aTkQo9tshfKZ8T2yS2mYWT/cHuxTedgv73sEO+r+F8OUI/PqYDEb
            I0kF5Ydjk/e6H+VHwpx6yCSJ2ZFcFYwwEnpPlBaDrw86Ycm+SL3B4gq42G9/F+XZrBWEgW9i
            HLtBBVkSMv6HA6eI/clANwL914fQ3sKY4ZKtLADb4ruilay+AxZm66x7yoTDqBdYVOy++aY8
            A87f


            This process utl_mail in the trigger:

            utl_mail.send(sender => 'dlima@datasierra.com.ec',
            recipients => a,
            subject => 'DATASIERRA PQR-CRM',
            message => 'DATASIERRA PQR-CRM'||CHR(10)||'Reclamo '||:new.ss||CHR(10)||:new.empleado_causante||CHR(10)||''||CHR(10)||auto_n_cliente||' Numero de Cedula: '||:new.cedula_cliente||' reclamo por: '||CHR(10)||''||CHR(10)||:new.descripcion||CHR(10)||''||CHR(10)||SYSDATE);

            a, auto_causante_mail, auto_crm are variable that contained emails.

            a:=auto_causante_mail||',pqr@datasierra.com.ec,'||auto_crm;

            I dont know what happen, can you help me please??
            • 3. Re: ora-29279: SMTP permanent error Unbalanced '>' XE
              Udo
              Hi Danny,
              ORA-29279: SMTP permanent error: 553 5.0.0 <arivera@assa.com.ec... Unbalanced '<'
              That's what I've been looking for - we have the SMTP code in addition to the hint.
              This usually indicates that something is wrong with the mail adress for your recipient.
              You have
              utl_mail.send(sender => 'dlima@datasierra.com.ec',
              recipients => a,
              subject => 'DATASIERRA PQR-CRM',
              message => 'DATASIERRA PQR-CRM'||CHR(10)||'Reclamo '||:new.ss||CHR(10)||:new.empleado_causante||CHR(10)||''||CHR(10)||auto_n_cliente||' Numero de Cedula: '||:new.cedula_cliente||' reclamo por: >'||CHR(10)||''||CHR(10)||:new.descripcion||CHR(10)||''||CHR(10)||SYSDATE);
              
              a, auto_causante_mail, auto_crm are variable that contained emails.
              
              a:=auto_causante_mail||',pqr@datasierra.com.ec,'||auto_crm;
              Could you check what "a" actually contains the addresses you expect and especially, if they are formatted correctly? Possibly let that trigger insert the value into some log table...
              Unbalanced <
              indicates that you have more opening brackets than closing ones, e.g. it seems
              <arivera@assa.com.ec
              should be
              <arivera@assa.com.ec>
              Possibly this is just a coincidence and the error is at some other mail address in your list, but it's somewhere in there.

              -Udo

              Edited by: Udo on 15.05.2012 17:53
              • 4. Re: ora-29279: SMTP permanent error Unbalanced '>' XE
                900384
                Dear UDO

                i dont think that the code is bad, i have the same code in my virtual machine in PC server with Windows server 2003 and that's works.
                In my pc Server:

                create or replace TRIGGER "AUTO"
                after insert on qr
                for each row

                declare
                /* auto_Nivel Variable que tomará el campo nivel del Empleado que Administre el Reclamo*/
                auto_nivel number;

                /*auto_mail_e y auto_mail_s Variable que tomará el campo del correo del Empleado que Administre el Reclamo y de
                su superior respectivamente*/
                auto_mail_e varchar2(30);
                auto_mail_s varchar(30);

                /*auto_responsable variable que tomará el campo cedula_empleado de la tabla QR*/
                auto_responsable varchar2(30):=:new.cedula_empleado;

                /*auto_n_empleado variable que tomará el nombre y apellido del empleado que Administre el Reclamo*/
                auto_n_empleado varchar2(60);

                /*auto_n_cliente variable que tomará el nombre y apellido del Cliente que solicitó la hoja de servicio*/
                auto_n_cliente varchar2(60);

                /*auto_CRM variable que tomará el correo electrónico de CRM*/
                auto_CRM varchar2(30);

                /*a variable que almacenará correo electrónicos*/
                a varchar2(120);

                /*a variable que almacenará el ID del empleado causante del reclamo*/
                auto_causante varchar2(30):=:new.empleado_causante;

                /*a variable que almacenará el correo electrónico del empleado causante del reclamo*/
                auto_causante_mail varchar2(30);

                /*ori_aux variable que almacenará el origen perteneciente a talleres, cuya recepción de Reclamos tiene
                una condición especial*/
                ori_aux number;
                ori number:=:new.origen;

                begin


                select c.nombre||' '||c.apellido into auto_n_cliente
                from cliente c where c.id=:new.cedula_cliente;



                IF :new.QUEJA_RECLAMO='QUEJA' THEN


                select e.email into auto_crm
                from empleados e where e.perfil='CRM';

                utl_mail.send(sender => 'dlima@datasierra.com.ec',
                recipients => auto_crm,
                subject => 'DATASIERRA PQR-CRM',
                message => 'DATASIERRA PQR-CRM'||CHR(10)||'Reclamo '||:new.ss||CHR(10)||:new.cedula_empleado||CHR(10)||auto_n_empleado||CHR(10)||''||CHR(10)||auto_n_cliente||' Numero de Cedula: '||:new.cedula_cliente||' queja por: '||CHR(10)||''||CHR(10)||:new.descripcion||CHR(10)||''||CHR(10)||SYSDATE);


                ELSE


                Select e.nivel into auto_nivel
                from empleados e where e.id=auto_responsable;


                select e.nombre||' '||e.apellido into auto_n_empleado
                from empleados e where e.id=auto_responsable;


                SELECT O.ORIGEN_MAYOR INTO ORI_AUX
                FROM ORIGEN O WHERE :NEW.ORIGEN=O.ID;



                /*Inserción de Datos en la tabla Seguimiento*/
                insert into seguimiento
                (id_ss,fecha_seguimiento,escalado_a,estado)
                values
                (:new.ss,:new.fecha,auto_responsable,'CASO ABIERTO');

                /*Proceso si el Origen del reclamo pertenece a Talleres*/


                if ori_aux=22 THEN

                select e.email into auto_causante_mail
                from empleados e where e.id=auto_causante;

                select e.email into auto_crm
                from empleados e where e.perfil='CRM';


                a:=auto_causante_mail||',pqr@datasierra.com.ec,'||auto_crm;

                /*Proceso de Envío de Correo a los destinatarios almacenados en la variable a*/
                utl_mail.send(sender => 'dlima@datasierra.com.ec',
                recipients => a,
                subject => 'DATASIERRA PQR-CRM',
                message => 'DATASIERRA PQR-CRM'||CHR(10)||'Reclamo '||:new.ss||CHR(10)||:new.empleado_causante||CHR(10)||''||CHR(10)||auto_n_cliente||' Numero de Cedula: '||:new.cedula_cliente||' reclamo por: '||CHR(10)||''||CHR(10)||:new.descripcion||CHR(10)||''||CHR(10)||SYSDATE);


                select e.email into auto_mail_e
                from empleados e where e.id=auto_responsable;


                a:=auto_mail_e;


                utl_mail.send(sender => 'dlima@datasierra.com.ec',
                recipients => a,
                subject => 'DATASIERRA PQR-CRM',
                message => 'DATASIERRA PQR-CRM'||CHR(10)||'Reclamo '||:new.ss||CHR(10)||auto_n_cliente||' Numero de Cedula: '||:new.cedula_cliente||' reclamo por: '||CHR(10)||''||CHR(10)||:new.descripcion||CHR(10)||''||CHR(10)||SYSDATE);

                if ori=2 then
                utl_mail.send(sender => 'dlima@datasierra.com.ec',
                recipients => 'pyanzapanta@assa.com.ec,p1sevilla@assa.com.ec,dlima@datasierra.com.ec',
                subject => 'DATASIERRA PQR-CRM',
                message => 'DATASIERRA PQR-CRM'||CHR(10)||'Reclamo '||:new.ss||CHR(10)||:new.empleado_causante||CHR(10)||''||CHR(10)||auto_n_cliente||' Numero de Cedula: '||:new.cedula_cliente||' reclamo por: '||CHR(10)||''||CHR(10)||:new.descripcion||CHR(10)||''||CHR(10)||SYSDATE);

                end if;

                else

                /*Proceso si empleado que administrará el reclamo es de nivel diferente de 1*/
                if auto_nivel <> 1 then

                /*Asignacióna del correo del Empleado que Administre el Reclamo y de su superior respectivamente
                a las variables auto_mail_e y auto_mail_s también respectivamente*/
                select e.email, x.email into auto_mail_e, auto_mail_s
                from empleados e, empleados x
                where e.id=auto_responsable and e.dependencia=x.id;

                /*Asignación de los correos Empleado que Administre el Reclamo, de su superior
                y de PQR@datasierra.com.ec respectivamente*/
                a:=auto_mail_e||','||auto_mail_s||',pqr@datasierra.com.ec';

                /*Proceso de Envío de Correo a los destinatarios almacenados en la variable a*/
                utl_mail.send(sender => 'dlima@datasierra.com.ec',
                recipients => a,
                subject => 'DATASIERRA PQR-CRM',
                message => 'DATASIERRA PQR-CRM'||CHR(10)||'Reclamo '||:new.ss||CHR(10)||:new.cedula_empleado||CHR(10)||auto_n_empleado||CHR(10)||''||CHR(10)||auto_n_cliente||' Numero de Cedula: '||:new.cedula_cliente||' reclamo por: '||CHR(10)||''||CHR(10)||:new.descripcion||CHR(10)||''||CHR(10)||SYSDATE);

                else




                /*Proceso si empleado que administrará el reclamo es de nivel 1*/

                /*Asignación del correo del empleado que administrará el reclamo*/
                select e.email into auto_mail_e
                from empleados e where e.id=auto_responsable;

                /*Proceso de Envío de Correo a los destinatarios almacenados en la variable a*/
                a:=auto_mail_e||',pqr@datasierra.com.ec';
                utl_mail.send(sender => 'dlima@datasierra.com.ec',
                recipients => a,
                subject => 'DATASIERRA PQR-CRM',
                message => 'DATASIERRA PQR-CRM'||CHR(10)||'Reclamo '||:new.ss||CHR(10)||:new.cedula_empleado||CHR(10)||auto_n_empleado||CHR(10)||''||CHR(10)||auto_n_cliente||' Numero de Cedula: '||:new.cedula_cliente||' reclamo por: '||CHR(10)||''||CHR(10)||:new.descripcion||CHR(10)||''||CHR(10)||SYSDATE);


                end if;

                end if;
                end if;

                end auto;




                ****************************
                I can send emails with this code without problems
                , but just in my virtual machine.




                ************
                I compare the code that is in my pc with Windows xp where I have the problem and its the same code, but that code doesn`t work and I get
                problems when I send the email.


                In my pc with windows XP

                create or replace trigger "AUTO"
                after insert on qr
                for each row

                declare
                /* auto_Nivel Variable que tomará el campo nivel del Empleado que Administre el Reclamo*/
                auto_nivel number;

                /*auto_mail_e y auto_mail_s Variable que tomará el campo del correo del Empleado que Administre el Reclamo y de
                su superior respectivamente*/
                auto_mail_e varchar2(30);
                auto_mail_s varchar(30);

                /*auto_responsable variable que tomará el campo cedula_empleado de la tabla QR*/
                auto_responsable varchar2(30):=:new.cedula_empleado;

                /*auto_n_empleado variable que tomará el nombre y apellido del empleado que Administre el Reclamo*/
                auto_n_empleado varchar2(60);

                /*auto_n_cliente variable que tomará el nombre y apellido del Cliente que solicitó la hoja de servicio*/
                auto_n_cliente varchar2(60);

                /*auto_CRM variable que tomará el correo electrónico de CRM*/
                auto_CRM varchar2(40);

                /*a variable que almacenará correo electrónicos*/
                a varchar2(120);

                /*a variable que almacenará el ID del empleado causante del reclamo*/
                auto_causante varchar2(30):=:new.empleado_causante;

                /*a variable que almacenará el correo electrónico del empleado causante del reclamo*/
                auto_causante_mail varchar2(40);

                /*ori_aux variable que almacenará el origen perteneciente a talleres, cuya recepción de Reclamos tiene
                una condición especial*/
                ori_aux number;
                ori number:=:new.origen;

                begin


                select c.nombre||' '||c.apellido into auto_n_cliente
                from cliente c where c.id=:new.cedula_cliente;



                IF :new.QUEJA_RECLAMO='QUEJA' THEN


                select e.email into auto_crm
                from empleados e where e.perfil='CRM';

                utl_mail.send(sender => 'dlima@datasierra.com.ec',
                recipients => auto_crm,
                subject => 'DATASIERRA PQR-CRM',
                message => 'DATASIERRA PQR-CRM'||CHR(10)||'Reclamo '||:new.ss||CHR(10)||:new.cedula_empleado||CHR(10)||auto_n_empleado||CHR(10)||''||CHR(10)||auto_n_cliente||' Numero de Cedula: '||:new.cedula_cliente||' queja por: '||CHR(10)||''||CHR(10)||:new.descripcion||CHR(10)||''||CHR(10)||SYSDATE);


                ELSE


                Select e.nivel into auto_nivel
                from empleados e where e.id=auto_responsable;


                select e.nombre||' '||e.apellido into auto_n_empleado
                from empleados e where e.id=auto_responsable;


                SELECT O.ORIGEN_MAYOR INTO ORI_AUX
                FROM ORIGEN O WHERE :NEW.ORIGEN=O.ID;



                /*Inserción de Datos en la tabla Seguimiento*/
                insert into seguimiento
                (id_ss,fecha_seguimiento,escalado_a,estado)
                values
                (:new.ss,:new.fecha,auto_responsable,'CASO ABIERTO');

                /*Proceso si el Origen del reclamo pertenece a Talleres*/


                if ori_aux=22 THEN

                select e.email into auto_causante_mail
                from empleados e where e.id=auto_causante;

                select e.email into auto_crm
                from empleados e where e.perfil='CRM';


                a:=auto_causante_mail||',pqr@datasierra.com.ec,'||auto_crm;

                /*Proceso de Envío de Correo a los destinatarios almacenados en la variable a*/
                utl_mail.send(sender => 'dlima@datasierra.com.ec',
                recipients => a,
                subject => 'DATASIERRA PQR-CRM',
                message => 'DATASIERRA PQR-CRM'||CHR(10)||'Reclamo '||:new.ss||CHR(10)||:new.empleado_causante||CHR(10)||''||CHR(10)||auto_n_cliente||' Numero de Cedula: '||:new.cedula_cliente||' reclamo por: '||CHR(10)||''||CHR(10)||:new.descripcion||CHR(10)||''||CHR(10)||SYSDATE);


                select e.email into auto_mail_e
                from empleados e where e.id=auto_responsable;


                a:=auto_mail_e;


                utl_mail.send(sender => 'dlima@datasierra.com.ec',
                recipients => a,
                subject => 'DATASIERRA PQR-CRM',
                message => 'DATASIERRA PQR-CRM'||CHR(10)||'Reclamo '||:new.ss||CHR(10)||auto_n_cliente||' Numero de Cedula: '||:new.cedula_cliente||' reclamo por: '||CHR(10)||''||CHR(10)||:new.descripcion||CHR(10)||''||CHR(10)||SYSDATE);

                if ori=2 then
                utl_mail.send(sender => 'dlima@datasierra.com.ec',
                recipients => 'pyanzapanta@assa.com.ec,p1sevilla@assa.com.ec,dlima@datasierra.com.ec',
                subject => 'DATASIERRA PQR-CRM',
                message => 'DATASIERRA PQR-CRM'||CHR(10)||'Reclamo '||:new.ss||CHR(10)||:new.empleado_causante||CHR(10)||''||CHR(10)||auto_n_cliente||' Numero de Cedula: '||:new.cedula_cliente||' reclamo por: '||CHR(10)||''||CHR(10)||:new.descripcion||CHR(10)||''||CHR(10)||SYSDATE);

                end if;

                else

                /*Proceso si empleado que administrará el reclamo es de nivel diferente de 1*/
                if auto_nivel <> 1 then

                /*Asignacióna del correo del Empleado que Administre el Reclamo y de su superior respectivamente
                a las variables auto_mail_e y auto_mail_s también respectivamente*/
                select e.email, x.email into auto_mail_e, auto_mail_s
                from empleados e, empleados x
                where e.id=auto_responsable and e.dependencia=x.id;

                /*Asignación de los correos Empleado que Administre el Reclamo, de su superior
                y de PQR@datasierra.com.ec respectivamente*/
                a:=auto_mail_e||','||auto_mail_s||',pqr@datasierra.com.ec';

                /*Proceso de Envío de Correo a los destinatarios almacenados en la variable a*/
                utl_mail.send(sender => 'dlima@datasierra.com.ec',
                recipients => a,
                subject => 'DATASIERRA PQR-CRM',
                message => 'DATASIERRA PQR-CRM'||CHR(10)||'Reclamo '||:new.ss||CHR(10)||:new.cedula_empleado||CHR(10)||auto_n_empleado||CHR(10)||''||CHR(10)||auto_n_cliente||' Numero de Cedula: '||:new.cedula_cliente||' reclamo por: '||CHR(10)||''||CHR(10)||:new.descripcion||CHR(10)||''||CHR(10)||SYSDATE);

                else




                /*Proceso si empleado que administrará el reclamo es de nivel 1*/

                /*Asignación del correo del empleado que administrará el reclamo*/
                select e.email into auto_mail_e
                from empleados e where e.id=auto_responsable;

                /*Proceso de Envío de Correo a los destinatarios almacenados en la variable a*/
                a:=auto_mail_e||',pqr@datasierra.com.ec';
                utl_mail.send(sender => 'dlima@datasierra.com.ec',
                recipients => a,
                subject => 'DATASIERRA PQR-CRM',
                message => 'DATASIERRA PQR-CRM'||CHR(10)||'Reclamo '||:new.ss||CHR(10)||:new.cedula_empleado||CHR(10)||auto_n_empleado||CHR(10)||''||CHR(10)||auto_n_cliente||' Numero de Cedula: '||:new.cedula_cliente||' reclamo por: '||CHR(10)||''||CHR(10)||:new.descripcion||CHR(10)||''||CHR(10)||SYSDATE);


                end if;

                end if;
                end if;

                end auto;
                ********************

                Both of them are the same, I dont know what happen.!
                • 5. Re: ora-29279: SMTP permanent error Unbalanced '>' XE
                  Udo
                  Hi,
                  i dont think that the code is bad, i have the same code in my virtual machine in PC server with Windows server 2003 and that's works.
                  I don't think that either. My guess was that the values used do not fit. Are you sure you have exactly the same data on your XP system compared to the 2003 server?
                  From what I see from skimming through your code it's the column email in table empleados in most cases. Could it be one of the mail addresses stored in there is invalid in the sense of containing an opening '<' without closing it at the end of the address?

                  -Udo