Using Outlook Express in Forms 6i [message #85968] |
Wed, 18 August 2004 00:14 |
Keshav
Messages: 17 Registered: December 2003
|
Junior Member |
|
|
I was using Outlook express in my Forms 6i project and i'm able to send a mail from my system. But i need to send that from other person who was an admin.
' I NEED TO ACCESS OTHER SYSTEM's OUTLOOK EXPRESS EMAIL-ID INORDER TO SEND MAIL TO OTHERS. CAN U GIVE ME A SOLUTION PLEASE......'
Thank you.
|
|
|
Re: Using Outlook Express in Forms 6i [message #85970 is a reply to message #85968] |
Wed, 18 August 2004 02:04 |
Himanshu
Messages: 457 Registered: December 2001
|
Senior Member |
|
|
Hi,
Try the following code:
DECLARE
OutlookApp OLE2.OBJ_TYPE;
NameSpace OLE2.OBJ_TYPE;
MailItem OLE2.OBJ_TYPE;
OLEPARAM OLE2.LIST_TYPE;
Send OLE2.OBJ_TYPE;
Attachments OLE2.OBJ_TYPE;
Attachment_dummy OLE2.OBJ_TYPE;
var1 varchar2(100);
Begin
--assign a value to the variable from the Oracle Form
-- var1 := :BLOCK5.txt5;
--but for testing, populate the variable 'by hand'
var1 := 'This is a test of Outlook from Oracle app.';
OutlookApp := OLE2.CREATE_OBJ('Outlook.Application');
OLEPARAM := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(OLEPARAM,'MAPI');
NameSpace := OLE2.INVOKE_OBJ(OutlookApp,'GetNameSpace',OLEPARAM);
OLE2.DESTROY_ARGLIST(OLEPARAM);
OLEPARAM := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(OLEPARAM,0);
MailItem := OLE2.INVOKE_OBJ(OutlookApp,'CreateItem',OLEPARAM);
OLE2.DESTROY_ARGLIST(OLEPARAM);
OLE2.SET_PROPERTY(MailItem,'To','joe.leibowitz@afosr.af.mil');
OLE2.SET_PROPERTY(MailItem,'Subject','message testing Outlook
automation from Oracle');
OLE2.SET_PROPERTY(MailItem,'Body', 'hello again '||var1);
--add an attachment
Attachments := OLE2.GET_OBJ_PROPERTY(MailItem,'Attachments');
OLEPARAM := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(OLEPARAM,'C:chris_school.txt');
Attachment_dummy := OLE2.INVOKE_OBJ(Attachments,'add',OLEPARAM);
OLE2.DESTROY_ARGLIST(OLEPARAM);
Send := OLE2.INVOKE_OBJ(MailItem,'Send');
--destroy objects
OLE2.RELEASE_OBJ(MailItem);
OLE2.RELEASE_OBJ(NameSpace);
OLE2.RELEASE_OBJ(OutlookApp);
END;
HTH
Regards
Himanshu
|
|
|
Re: Using Outlook Express in Forms 6i [message #85971 is a reply to message #85970] |
Wed, 18 August 2004 02:52 |
Keshav
Messages: 17 Registered: December 2003
|
Junior Member |
|
|
THANKS FOR REPLYING.
But, I know the mail concept in forms 6i and it was working property. But the problem is that, actually i was doing a project and i need to send a mail from other persons mail id. But, at present it was going from my id. So, Can u suggest a solution for this, how i can use from address in the mail such that the recipent can view the from address of the other person(Admin) but not mine. Hope u understood my query correctly. Please reply back. Thank u again for replying for my previous query.
|
|
|
|
Re: Using Outlook Express in Forms 6i [message #236921 is a reply to message #85968] |
Fri, 11 May 2007 06:01 |
Sidhant
Messages: 5 Registered: November 2006
|
Junior Member |
|
|
Dear Keshav,
my application can sucessfully send mail thru MS-OUTLOOK from Forms6i..
iam using ..OLE2.CREATE_OBJ('OUTLOOK.APPLICATION');..
But i need to call OUTLOOK EXPRESS the default mail client.
Since u said u hv done this thru outlook express..kindly tell
me what u used in place of 'OUTLOOK.APPLICATION'..AS the connector..
Its a big issue pl help..if possible mail to my id below
Sidhant
snm1231@rediffmail.com
|
|
|
|
|