4 Replies Latest reply: Jun 2, 2013 1:00 AM by karim fathy RSS

    how could i add attachment in this code

    karim fathy
      i have code when_button_pressed (send email) but i want attach file
      how can i do this ?
      this is the code

      -------only for outlook
      --- THIS IS OLE CODE FOR MORE INFO. SEE HELP .

      DECLARE
      --PROCEDURE SendMail
      objOutlook OLE2.OBJ_TYPE;
      objMail OLE2.OBJ_TYPE;
      objArg OLE2.LIST_TYPE;
      vfilename varchar2(300);

      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..............');

      exception

      when others then

      message(sqlerrm);message(sqlerrm);

      END;

      thanks.