Envío de Email desde Oracle

He digitado el siguiente procedimiento almacenado que permite enviar email desde oracle: PROCEDURE Prc_Send_Mail ( mailhost IN VARCHAR2 , sender IN VARCHAR2 , recipient IN VARCHAR2 , subject IN VARCHAR2 , message IN VARCHAR2 , error OUT VARCHAR ) IS v_connect utl_smtp.connection; BEGIN v_connect := utl_smtp.open_connection(mailhost, 25); utl_smtp.helo(v_connect, mailhost); utl_smtp.mail(v_connect, sender); utl_smtp.rcpt(v_connect, recipient); utl_smtp.open_data (v_connect); utl_smtp.write_data(v_connect,'From: ' ||sender ||utl_tcp.crlf); utl_smtp.write_data(v_connect,'To: ' ||recipient||utl_tcp.crlf); utl_smtp.write_data(v_connect,'Subject: ' ||subject ||utl_tcp.crlf); utl_smtp.close_data (v_connect); utl_smtp.write_data(v_connect,message); utl_smtp.quit(v_connect); EXCEPTION WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN utl_smtp.quit(v_connect); RAISE_APPLICATION_ERROR(-20000,'Failed to send mail due to the following error: ' || sqlerrm); error := SQLERRM; WHEN OTHERS THEN utl_smtp.quit(v_connect); error := SQLERRM; END; Al intentar enviar un correo me retorna el siguiente mensaje: The following error has occurred: ORA-29540: class oracle/plsql/net/TCPConnection does not exist ORA-06512: at "SYS.UTL_TCP", line 537 ORA-06512: at "SYS.UTL_TCP", line 287 ORA-06512: at "SYS.UTL_TCP", line 361 ORA-06512: at "SYS.UTL_TCP", line 437 ORA-06512: at "SYS.UTL_SMTP", line 42 ORA-06512: at "SYS.UTL_SMTP", line 152 ORA-06512: at "SYS.UTL_SMTP", line 133 ORA-06512: at "SYS.UTL_SMTP", line 341 ORA-06512: at "SYS.UTL_SMTP", line 356 ORA-06512: at "PRC_SEND_MAIL", line 35 ORA-29540: class oracle/plsql/net/TCPConnection does not exist ORA-06512: at line 4 Qué falta instalar? Desde ya muchas gracias, - . Ariel . -

1 respuesta

Respuesta
1
Dice que no existe la clase TCPCOnnection, que es la que el UTL_SMTP utiliza para enviar mails...
Tienes el script que crea la Java Virtual Machine en el directorio rdbms/admin/initjvm.sql

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas