|
|
|||||
|
|
|||||
|
|||||
|
|
Easier Extended MAPI Anyone who's ever implemented anything in extended MAPI knows that getting your project off the ground involves a lot of research and even more patience - extended MAPI is no easy beast! By now you've probably got your hands on the original extended MAPI headers for Delphi, developed by Alexander Staubo and later updated by Dmitry Streblechenko (can't recommend Dmitry enough when it comes to help on extended MAPI). These units contain a raw translation of the C++ headers and nothing more, providing the basic building blocks required by your application but lacking anything that automates some of the more commonly used MAPI functionality. I recently created a service that required access to a specific Outlook mailbox; if you've ever developed services that require Outlook access you'll know that Outlook is not designed to work from within a service and your only option for accessing Outlook becomes extended MAPI or CDO. After some initial investigation I realised this code didn't contain simple automation routines like connecting to, or disconnecting from an Outlook account, or to basic folders within an account such as the Inbox and Outbox. So I created the MapiServices unit. Whilst this unit in no way pretends to offer all extended MAPI functionality in an easy to use manner, it does allow you to connect to someone's Inbox or Outbox (or with minimal development, any other folder) in one simple step. Access to mail items within those folders is straightforward and access to attachments connected with mail items is done via native Delphi streams. The following example demonstrates how easy it is to connect to the Inbox of someone's account and to enumerate available mail items: uses Note: Requirements
Download Code MapiServices.pas can be downloaded here.
|
||||
|
Microsoft Outlook is a registered
trademark of Microsoft Corporation. | |||||