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 -> Re: Please help ! Email sending from server - errors

Re: Please help ! Email sending from server - errors

From: Jining Han <hanj_at_mailcity.com>
Date: Tue, 02 Jan 2001 16:08:43 GMT
Message-ID: <92sue5$2e5$1@nnrp1.deja.com>

Run initplsj.sql, typically found under $ORACLE_HOME/rdbms/admin

In article <92j119$1qu$1_at_nnrp1.deja.com>,   hnene_at_my-deja.com wrote:
> Hi,
> I want to implement email sending mechanism from oracle server. I
> don't want it to be done through polling or job.
> From the oracle documentation it seems pretty straight forward
> (example code at the end).
>
> So I copied and pasted the example code to one sql file. The
 procedure
> "send_mail" compiled without problem. But while calling it from
 another
> sql procedure gave following runtime errors :
>
> ----------------------------------------------
> 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 "SECOND.SEND_MAIL", line 8
> ORA-06512: at line 5
>
> ERROR Code meanings from Oracle Database
> ----------------------------------------
>
> ORA-29540 class string does not exist
>
> Cause: Java method execution failed to find a class with the
> indicated name.
>
> Action: Correct the name or add the missing Java class.
>
> ---
> ORA-06512 at stringline string
>
> Cause: Backtrace message as the stack is unwound by unhandled
> exceptions.
>
> Action: Fix the problem causing the exception or write an
 exception
> handler for this condition. Or you may need to contact your
 application
> administrator or database administrator.
> ---------------------------------------------------
>
> I could not make out what really caused this and how to fix this.
 Has
> anyone experienced this ? Can you please help me out ?
>
> I'm on Oracle 8.16.
>
> Thank you,
> Regards,
> -H
>
> Here's the example code given in Oracle Documentation:
>
> PROCEDURE send_mail (sender IN VARCHAR2,
>
> recipient IN VARCHAR2,
>
> message IN VARCHAR2)
>
> IS
>
> mailhost VARCHAR2(30) := 'mail.mycompany.com';-- this is
 replaced
> by correct domain
> 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);
>
> END send_mail;
>
> Sent via Deja.com
> http://www.deja.com/
>

--
Jining Han
USA Group


Sent via Deja.com
http://www.deja.com/
Received on Tue Jan 02 2001 - 10:08:43 CST

Original text of this message

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