Re: Email and PL/SQL

From: Eric Keen <ekeen_at_dps-corp.com>
Date: 1998/04/07
Message-ID: <352ABABD.2C4A9435_at_dps-corp.com>#1/1


Mike,

[Quoted] [Quoted] Check the following URL and viewable text.

Eric

http://technet.oracle.com/support/scr/content/425/425.htm

                                                        Sending E-Mail
using External Procedures 
                                                                                 

Last Updated on 11-NOV-97
 This sample calls an external procedure from a PL/SQL procedure to send e-mail using SMTP. (Oracle 8) Successful execution is

    contingent upon having the TNSNAMES.ORA and the LISTENER.ORA files configured correctly. Attached is the DLL and the                                                                                                    

source.

Download: Extproc.zip (46 KB)

CREATE OR REPLACE LIBRARY EMAILTEST AS 'D:\ORANT\EXTPROC\MAILTEST.DLL' CREATE OR REPLACE procedure EMAILER
(V IN OUT VARCHAR2, W IN OUT VARCHAR2, X IN OUT VARCHAR2, y IN OUT VARCHAR2, Z IN OUT VARCHAR2)
 AS
 external name "EMailer" -- EMailer is the name of function in MAILTEST.DLL
 library EMAILTEST
/

CREATE OR REPLACE PROCEDURE RUNEMAILER

(V VARCHAR2,
 W VARCHAR2,
 X VARCHAR2,
 Y VARCHAR2,

 Z VARCHAR2)
IS
V_SENDER VARCHAR2(40)  := V;
V_REC VARCHAR2(40)     := W;
V_HOST VARCHAR2(40)    := X;
V_SUBJECT VARCHAR2(40) := Y;
V_BODY VARCHAR2(40)    := Z;

BEGIN
EMAILER(V_SENDER, V_REC, V_HOST, V_SUBJECT, V_BODY); END;
/

EXECUTE runemailer('fromMe', 'ToYOu_at_us.oracle.com', 'Mail Server', 'Subject Line', 'Body of mail message');

Michael Brung wrote:
>
> Hello.
>
> I'd like to make my pl/sql program send an email. I've been told that
> dbms_mail package could help me, but I use oracle 8 with ows, and I haven't
> found anything about this package.
> Has anyone an idea ? (knowing that I cannot execute a cgi script on my server
> because of my webmaster)
>
> Thank you,
> mB
 

-- 

Only 634 days left to stock up on canned goods and ammo before
01-JAN-2000
Received on Tue Apr 07 1998 - 00:00:00 CEST

Original text of this message