-
How to Send Email Through Developer using Micrsoft Outlook
Here is the Code to Send Email From Developer 2000 using Microsoft Outlook(Note :- Outlook should be configured)
Steps:-
1. First Add the Wrapper Procedures for Outlook Express from the OLE Importer Utility such as
· OUTLOOK_ATTACHMENT
· OUTLOOK_MAILITEM
PROCEDURE SENDEMAIL(to_Person varchar2,subject varchar2,body varchar2) IS
EmailApp ole2.obj_type;
EmailItem Ole2.Obj _Type;
EmailAttachment Ole2.Obj_Type;
EmailAttach ole2. obj_Type;
aa number(5):=1;
begin
EmailApp:=ole2.create_obj('outlook.application');
EmailItem:=ole2. create_obj('outlook.mail item');
EmailAttachment:=ole2.create_obj('outlook.Attachment');
EmailItem:=Outlook_Application.create Item(Email App,Outlook_Constants.olmailitem);
EmailAttach:=Outlook_Mail Item.Attachment(Email Item);
Add attachment From Block
Go_block('BLK_ATTACHMENT');
FIRST_RECORD;
LOOP
Email Attachment:=OutLook_Attachment.ole_Add(EmailAttach,;BLK_ATTACHMENTS.attach,1,AA,ISPNAME);
AA:=AA+1;EXIT WHEN:SYSTEM.LAST_RECORD='TRUE';
NEXT_RECORD;
END LOOP;
Outlook_mailitem.OLE_to(EmailItem,TO_PERSON);
Outlook_mailitem.subject(emailitem,SUBJECT);
Outlook_mailitem.Ole_body(emailitem,MAIL.BODY);
Outlook_mailitem.send(emailItem);
End;
-
How to Send Email Through Developer using Outlook
Here is the Code to Send Email From Developer 2000 using Microsoft Outlook(Note :- Outlook should be configured)
Steps:-
1. First Add the Wrapper Procedures for Outlook Express from the OLE Importer Utility such as
· OUTLOOK_ATTACHMENT
· OUTLOOK_MAILITEM
PROCEDURE SENDEMAIL(to_Person varchar2,subject varchar2,body varchar2) IS
EmailApp ole2.obj_type;
EmailItem Ole2.Obj _Type;
EmailAttachment Ole2.Obj_Type;
EmailAttach ole2. obj_Type;
aa number(5):=1;
begin
EmailApp:=ole2.create_obj('outlook.application');
EmailItem:=ole2. create_obj('outlook.mail item');
EmailAttachment:=ole2.create_obj('outlook.Attachment');
EmailItem:=Outlook_Application.create Item(Email App,Outlook_Constants.olmailitem);
EmailAttach:=Outlook_Mail Item.Attachment(Email Item);
Add attachment From Block
Go_block('BLK_ATTACHMENT');
FIRST_RECORD;
LOOP
Email Attachment:=OutLook_Attachment.ole_Add(EmailAttach,;BLK_ATTACHMENTS.attach,1,AA,ISPNAME);
AA:=AA+1;EXIT WHEN:SYSTEM.LAST_RECORD='TRUE';
NEXT_RECORD;
END LOOP;
Outlook_mailitem.OLE_to(EmailItem,TO_PERSON);
Outlook_mailitem.subject(emailitem,SUBJECT);
Outlook_mailitem.Ole_body(emailitem,MAIL.BODY);
Outlook_mailitem.send(emailItem);
End;
-
Originally Posted by greatanjum
Here is the Code to Send Email From Developer 2000 using Microsoft Outlook(Note :- Outlook should be configured)
Steps:-
1. First Add the Wrapper Procedures for Outlook Express from the OLE Importer Utility such as
· OUTLOOK_ATTACHMENT
· OUTLOOK_MAILITEM
PROCEDURE SENDEMAIL(to_Person varchar2,subject varchar2,body varchar2) IS
EmailApp ole2.obj_type;
EmailItem Ole2.Obj _Type;
EmailAttachment Ole2.Obj_Type;
EmailAttach ole2. obj_Type;
aa number(5):=1;
begin
EmailApp:=ole2.create_obj('outlook.application');
EmailItem:=ole2. create_obj('outlook.mail item');
EmailAttachment:=ole2.create_obj('outlook.Attachment');
EmailItem:=Outlook_Application.create Item(Email App,Outlook_Constants.olmailitem);
EmailAttach:=Outlook_Mail Item.Attachment(Email Item);
Add attachment From Block
Go_block('BLK_ATTACHMENT');
FIRST_RECORD;
LOOP
Email Attachment:=OutLook_Attachment.ole_Add(EmailAttach,;BLK_ATTACHMENTS.attach,1,AA,ISPNAME);
AA:=AA+1;EXIT WHEN:SYSTEM.LAST_RECORD='TRUE';
NEXT_RECORD;
END LOOP;
Outlook_mailitem.OLE_to(EmailItem,TO_PERSON);
Outlook_mailitem.subject(emailitem,SUBJECT);
Outlook_mailitem.Ole_body(emailitem,MAIL.BODY);
Outlook_mailitem.send(emailItem);
End;
Can we set the From Option for sending the mail
'cause now i am sending mail through D2K form and when i send mail then from item set auto of my outlook id,
but i want to set another id for that
plz. help me
regards
Rakesh
-
Auto mail generation through Outlook Express
Dear Sir/Madam
I have tried to generate auto email throuh the given code but found some error in implementation of sendmail procedure. plz someone help me in this regard.
error in this line
EmailItem:=Outlook_Application.create Item(Email App,Outlook_Constants.olmailitem);
EmailAttach:=Outlook_Mail Item.Attachment(Email Item);
Thanks
Madhav Paliwal
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|