| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> UTL_SMTP Error
Oracle 8i (R2) on Redhat 6.2
When trying to use the UTL_SMTP package on the above platform, I get the following error :
"Connected to:
Oracle8i Enterprise Edition Release 8.1.6.1.0 - Production
With the Partitioning option
JServer Release 8.1.6.0.0 - Production
SQL> execute send_mail('oracle','root','test message'); begin send_mail('oracle','root','test message'); end;
*
ERROR at line 1:
ORA-29540: class oracle/plsql/net/TCPConnection does not exist ORA-06512: at "SYS.UTL_TCP", line 533 ORA-06512: at "SYS.UTL_TCP", line 199 ORA-06512: at "SYS.UTL_SMTP", line 99 ORA-06512: at "SYS.UTL_SMTP", line 121 ORA-06512: at "SYSTEM.SEND_MAIL", line 9 ORA-06512: at line 1
The SEND_MAIL procedure is as follows :
PROCEDURE send_mail (sender IN VARCHAR2,
recipient IN VARCHAR2,
message IN VARCHAR2)
IS
mailhost VARCHAR2(30) := 'localhost'; mail_conn utl_smtp.connection;
BEGIN
mail_conn := utl_smtp.open_connection(mailhost, 25);
utl_smtp.helo(mail_conn, mailhost);
utl_smtp.mail(mail_conn, sender);
utl_smtp.rcpt(mail_conn, recipient);
utl_smtp.data(mail_conn, message);
utl_smtp.quit(mail_conn);
utl_smtp.quit(mail_conn);
raise_application_error(-20000,
'Failed to send mail due to the following error: ' || sqlerrm);
END; When I checked ORA-29540 from oerr it suggested I needed to add a missing Java class. Can anyone tell me how to do this, as I thought I had installed all the necessary Java components?
Thanks
Guy Fullalove
(anti-spam reply address, use guy.fullalove_at_lineone.net instead)
Received on Sun Aug 27 2000 - 14:37:40 CDT
![]() |
![]() |