Sending mail through forms and Send A Mail From Oracle10g Forms (merged) [message #321800] |
Wed, 21 May 2008 06:30 |
nagendra1217
Messages: 4 Registered: May 2007
|
Junior Member |
|
|
Below code working fine when i am using Forms6i.
But i want to send a mail by Forms10g..
If any body knows about that plese reply to me..
nagendra1217@gmail.com
Thanks&Regards,
Nagendra.
declare
objOutlook OLE2.OBJ_TYPE;
objMail OLE2.OBJ_TYPE;
objArg OLE2.LIST_TYPE;
objAttach OLE2.OBJ_TYPE;
BEGIN
objOutlook := OLE2.CREATE_OBJ('Outlook.Application');
-- Previous example usually used 'mapi.session' but this doesn't work correctly
--anymore.
objarg := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(objarg,0);
objMail := OLE2.INVOKE_OBJ(objOutlook,'CreateItem', objarg);
OLE2.DESTROY_ARGLIST(objarg);
objAttach := OLE2.GET_OBJ_PROPERTY(objmail, 'Attachments');
objarg := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(objarg,'c:\test.txt'); -- filename
OLE2.SET_PROPERTY(objmail,'To','shashidhar.patel@intertecsys.com');
OLE2.SET_PROPERTY(objmail,'Subject','Email sent from Oracle Forms 9i');
OLE2.SET_PROPERTY(objmail,'Body','This is an email that was sent using CLIENT_OLE2 from Oracle forms 9i');
OLE2.INVOKE(objattach, 'Add', objarg);
OLE2.INVOKE(objmail,'Send');
OLE2.RELEASE_OBJ(objmail);
OLE2.RELEASE_OBJ(objOutlook);
OLE2.DESTROY_ARGLIST(objarg);
END;
|
|
|
|
Sending mail through forms [message #321965 is a reply to message #321800] |
Wed, 21 May 2008 23:39 |
shilpaselite
Messages: 2 Registered: January 2006 Location: Bangalore
|
Junior Member |
|
|
hi,
I want to send mail through forms10g.
Below mentioned code is working in forms6i but it is not working
in oracle10g.
How we can use OLE objects in oracle10g.
PROCEDURE sendmail IS
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','shilpa.raju@intertecsys.com');
OLE2.SET_PROPERTY(objmail,'Subject','Notification');
OLE2.SET_PROPERTY(objmail,'Body','Hi Shilpa How R u..');
OLE2.INVOKE(objmail,'Send');
OLE2.INVOKE(objmail,'Display');
OLE2.RELEASE_OBJ(objmail);
OLE2.RELEASE_OBJ(objOutlook);
END;
Shilpa
|
|
|
|
|
|