Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Send mail from 8i SMTP package

Send mail from 8i SMTP package

From: Per Sverre Stiansen <per.sverre.stiansen_at_caa.no>
Date: Sat, 26 Aug 2000 11:15:48 +0200
Message-ID: <aVLp5.3035$A_.61928@news1.online.no>

Hi all!
I'm trying to use the SMTP package to send email but have some problems. It is probably due to some bad environment variables or missing installed components. Running Oracle 8.1.6 on Solaris 2.6. The send_mail procedure is like (based on the example from Oracle documentation):

PROCEDURE send_mail (sender IN VARCHAR2, recipient IN VARCHAR2,
message IN VARCHAR2)
IS
mailhost VARCHAR2(30) := '<mailhost.mydomain.com>'; 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);

EXCEPTION
WHEN OTHERS THEN
-- Handle the error
END; After calling this procedyre I'm receiving the following error:

SQL> exec send_mail('test','test','Test') BEGIN send_mail('test','test','Test'); 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 "OSNASS.SEND_MAIL", line 8
ORA-06512: at line 1


SQL> Can anyone point me in the right direction to solve this problem?

--Peres-- Received on Sat Aug 26 2000 - 04:15:48 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US