Mega Code Archive

 
Categories / Delphi / LAN Web TCP
 

Extended Mapi

Title: Extended Mapi Question: Accessing the Extended Mapi interface is not allways trivial. The attached component helps a quite a bit with this problem. This component will currently only allow inbound processing. Outbound support will come in a week or two. The attachment is sent to the webmaster which will update this article with the proper url. Answer: To read all the new messages in the inbox, you can use something like this: Var ExtendedMapi : TExtendedMapi; I : Integer; Begin ExtendedMapi := TExtendedMapi.Create(False); ExtendedMapi.ListAllMessagesOnLogon := True; ExtendedMapi.ManualMessageHandling := False; ExtendedMapi.LogOn('The profilename here', 'The profile password here', False); IF (Assigned(ExtendedMapi.Inbox)) Then Begin For I := 0 to ExtendedMapi.Inbox.MessageCount-1 do Begin IF (ExtendedMapi.Inbox.Messages[I].UnRead) Then Begin ShowMessage( ExtendedMapi.Inbox.Messages[I].DisplayTo ); End; End; End; ExtendedMapi.Free; End;