Re: EMail from FORMS 6.0

From: Eric Givler <egivler_at_flash.net>
Date: Mon, 11 Sep 2000 15:47:28 GMT
Message-ID: <k87v5.4301$oc3.205904_at_news.flash.net>


Request outlook.pdf from your Metalink support site (I don't have it)

Or, here's some sample code (untested):

PROCEDURE outlook_ole IS
mailapp OLE2.OBJ_TYPE;
mailmsg OLE2.OBJ_TYPE;
msg_recp OLE2.OBJ_TYPE;
recipient OLE2.OBJ_TYPE;
lArgs OLE2.LIST_TYPE;
BEGIN

/***************************************/
/*** Connect (handle) to Outlook ***/
/***************************************/
Mailapp := OLE2.CREATE_OBJ('Outlook.Application'); OLE2.INVOKE(Mailapp,'AppShow');
/************************************/

/*** Create a new Mail Message ***/
/************************************/

lArgs := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(lArgs,0);
mailmsg := OLE2.INVOKE_OBJ(Mailapp,'CreateItem',lArgs); OLE2.DESTROY_ARGLIST(lArgs);
/************************************/

/*** Add Subject and Body Text ***/
/************************************/

OLE2.SET_PROPERTY(Mailmsg,'Subject','Test from Forms 4.5'); OLE2.SET_PROPERTY(Mailmsg,'Body','Testing....');
/*******************************/

/*** Add Recipient Name(s) ***/
/*******************************/

msg_recp := OLE2.GET_OBJ_PROPERTY(Mailmsg,'Recipients'); lArgs := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(lArgs,'Mulier, Carolyn');
recipient := OLE2.INVOKE_OBJ(msg_recp,'Add',largs);
OLE2.DESTROY_ARGLIST(lArgs);
OLE2.SET_PROPERTY(recipient,'Type',1); /** To **/
OLE2.INVOKE(recipient,'Resolve');

msg_recp := OLE2.GET_OBJ_PROPERTY(Mailmsg,'Recipients'); lArgs := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(lArgs,'Arcilla, Dan');
recipient := OLE2.INVOKE_OBJ(msg_recp,'Add',largs);

OLE2.DESTROY_ARGLIST(lArgs);
OLE2.SET_PROPERTY(recipient,'Type',2); /** CC **/
OLE2.INVOKE(recipient,'Resolve');

/***************************************/
/*** Save/Send the Mail Item ***/
/***************************************/
OLE2.INVOKE(Mailmsg,'Save');
lArgs := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(lArgs,0);
OLE2.INVOKE(Mailmsg,'Send',lArgs);
OLE2.DESTROY_ARGLIST(lArgs);

/***************************************/
/*** Release the Objects ***/
/***************************************/
OLE2.RELEASE_OBJ(recipient);
OLE2.RELEASE_OBJ( msg_recp );

OLE2.RELEASE_OBJ(mailmsg);
OLE2.RELEASE_OBJ(Mailapp);

END; Marc Lafontaine <Lafontaine.m_at_videotron.ca> wrote in message news:39B9935E.8358E0C0_at_videotron.ca...
> Hi,
>
> I was wondering if any of you ever sent an EMail trough a ORACLE
> Form on a trigger. For instance, in a COMPUTER LOAN application if
> somebody's computer loan expires in 1 month, you want the form to send
> this user an EMail. Is this possible to do in forms 6.0 if so, how is it
> done... through built in procedures, libraries??? I wan't sample code or
> examples if possible.
>
> PLEASE HELP
>
> Thanks,
>
> Marc Lafontaine...
>
> EMAIL: Lafontaine.m_at_videotron.ca
>
>
Received on Mon Sep 11 2000 - 17:47:28 CEST

Original text of this message