Re: How to automatically send an E-mail???

From: <herberzh_at_yahoo.com.au>
Date: Mon, 13 Aug 2001 07:38:02 GMT
Message-ID: <utLd7.121$D4.9_at_www.newsranger.com>


Define a function or procedure prototype that linked to an external java class.

In the java class implement send mail function (via MAPI).

Define a trigger that tigger off a store procedure while a new row is inserted to the table.

Create a new procedure to handle this trigger process.

From the newly created procedure calls the function or procedure that associated with external send mail function in java.

One thing need to remember java function defined in the java class need to be static type. For example:

class MyPostOffice
{
public static void sendMail(String mailTo, String Content) {
// ...
}
}

And you need define a PL/SQL procedure for external java program like this: procedure java_send_mail(varchar2 mail_to, varchar2 content) as language java name 'MyPostOffice.sendMail';

And call this java_send_mail procedure from your PL/SQL trigger function/procedure.

Hope it helps.

  • Herbert

In article <9l3pss$aaq$1_at_sunce.iskon.hr>, denis says...
>
>Hi!
>
>Does anyone have a solution for following problem:
>
>When I insert a row in a table, some procedure must automatically send a
>e-mail to predetermined
>address. I need to use Java to solve that problem.
>
>Can I solve that problem by Java stored procedures?
>
>Thanks
>
>
Received on Mon Aug 13 2001 - 09:38:02 CEST

Original text of this message