Re: Seding mail forms using outlook with attachment

From: DA Morgan <damorgan_at_psoug.org>
Date: Wed, 29 Mar 2006 11:39:57 -0800
Message-ID: <1143661187.726676_at_yasure.drizzle.com>


jayesh.prabhu_at_gmail.com wrote:
> Hi ,
> My application has to send simple mail using forms.
> Below is code for sending mail.
>
> DECLARE
> objOutlook OLE2.OBJ_TYPE;
> objMail OLE2.OBJ_TYPE;
> objArg OLE2.LIST_TYPE;
> BEGIN
> objOutlook := OLE2.CREATE_OBJ('Outlook.Application');
> objarg := OLE2.CREATE_ARGLIST;
> OLE2.ADD_ARG(objarg,0);
> objMail := OLE2.INVOKE_OBJ(objOutlook,'CreateItem',objarg);
> OLE2.DESTROY_ARGLIST(objarg);
>
> OLE2.SET_PROPERTY(objmail,'To',:TO);
> OLE2.SET_PROPERTY(objmail,'Subject',:SUBJECT);
> OLE2.SET_PROPERTY(objmail,'Body',:BODY);
>
> OLE2.INVOKE(objmail,'Send');
> OLE2.INVOKE(objmail,'Display');
> OLE2.RELEASE_OBJ(objmail);
> OLE2.RELEASE_OBJ(objOutlook);
> Message('Your mail sent successfully..............');
> Message('Your mail sent successfully..............');
> END;
>
>
> This is working fine.
> Now I want to add "Attachment" facility in this form.
> Need this help urgently. Pls.
>
> Jayesh.

Assuming you are actually working with Oracle. Which is rather questionable given what you wrote.

  1. What version?
  2. Use the UTL_MAIL built-in package.

There is no value in reinventing the wheel.

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Wed Mar 29 2006 - 21:39:57 CEST

Original text of this message