BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Warning Message also with Redemption 3.4

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Peter Brause
Guest





PostPosted: Wed Dec 29, 2004 9:39 pm    Post subject: Warning Message also with Redemption 3.4 Reply with quote



Hi,
I get a warning message from Outlook though I use Redemption. I have OL2003
and am using a POP3/SMTP transport and a PST file as a message store.
Here is my code:
procedure TForm1.Button1Click(Sender: TObject);
var
myOlApp, myNameSpace, myFolder, myItem, SafeItem, myRecipient, myUtils :
OleVariant;
const
olApplication = 'Outlook.Application';
olFolderOutbox = 4;
begin
try
myOlApp := CreateOleObject(olApplication);
myNameSpace := myOlApp.GetNamespace('MAPI');
OleVariant(myNameSpace).Logon;
myFolder := myNameSpace.GetDefaultFolder(olFolderOutbox);
myItem := myFolder.Items.Add;
myItem.Subject := 'Subject';
myItem.Body := 'xxx';
SafeItem := CreateOleObject('Redemption.SafeMailItem');
SafeItem.Item := myItem;
myRecipient := SafeItem.Recipients.Add('echo (AT) tu-berlin (DOT) de');
myItem:=myItem.Move(myFolder);
myItem:=myItem.Send;
myUtils := CreateOleObject('Redemption.MAPIUtils');
myUtils.DeliverNow;
finally
myOlApp := unassigned;
myNameSpace := unassigned;
myFolder := unassigned;
myItem := unassigned;
SafeItem := unassigned;
myRecipient := unassigned;
myUtils := unassigned;
end;
end;

How to get rid of the warning message?
Peter


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.