Q: Outlook security warning - MAPI?

F

Fred

We have an CTI (Computer Telephony Integration) application accessing the
Outlook inbox in order to extract mail and attachments for agents. We used
to access Outlook through the Outlook Object Model via COM. The thing is
that with Outlook 2003 we do get this security warning telling the user that
an external app is trying to access the inbox. My question is actually how
do we get rid of it, i.e how to change the application so that the user does
not see the warning all the time.

I colleague tried to access Outlook via MAPI/CDO instead of using the COM
objects with great result, is this the right or prefered way to access
Outlook 2003? Is there a glitch or will this work in the future? I assume
the first logon of the session object is the thing that makes it
trustworthy?


Just a small example from Delphi:
uses
MAPI_TLB,CDONTS_TLB

var
objSession: TCDOSession;

procedure TForm1.ButtonIterateClick(Sender: TObject);
var
objItem, objAttachment: variant;
i, j: integer;
ov: OleVariant;
tmpPath, tmpFileName, tmpSubject: string;
begin
objSession.Logon("Profile string");

for i := 1 to objSession.Inbox.Messages.Count do
begin
ov := i;
objItem := objSession.Inbox.Messages.Item[ov];
for j := 1 to objItem.Attachments.Count do
begin
ov := j;
objAttachment := objItem.Attachments.Item[ov];
tmpSubject := objItem.Subject;
...
end;
end;
end;

TIA,
/Fred
 
R

Richard P

As I recall there is no way to stop the warning messages because Outlook
cannot distinguish between a friendly program and a virus.

If functionality permits, you can reduce the number of popups if you avoid
using certain methods. For example you can provide a string for the "TO"
field instead of creating a Recipient; and instead of sending the message
you can save it in the Drafts folder and send it manually.

The COM objects bypass Outlook and use SMTP.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top