Home Development Partners Resellers About  
  The Messaging API is a COM-like API that provides access to the contents of messaging stores. "Extended MAPI in Delphi" is a package providing access to Outlook-compatible objects through a COM-based API. Using MAPI, a program can connect to a MAPI store, and then perform operations against that store.
Extended MAPI in Delphi

Examples (page 4)
 
Request # 8
How to use Personal folder (*.PST) files from DELPHI
(Loading and Creating a *.PST)

How with Extended MAPI a developer working on Borland DELPHI can create or/and load a PST file without existing MAPI profile.
Then you can use this *.PST as your Private Store, that hold secret data.
Personal Information Stores - PST files - offers ideal opportunities for storing our correspondence in one place.

This example will illustrate how to create/open PST files.
In addition, we will illustrate how to copy/move/erase messages and folders.
We chose to illustrate this here, since it is assumed that the PST file will not contain significant information and we may fidget with the data.

We will show you how to implement the IMAPIProgress class that MAPI provides for the process visualization.
With it you may, for instance, build an indicator that will show the process of copying 10 000 e-mails from one folder into another. The user will be able to monitor the process and will not be bored - something is "moving" there :-)

Also:
  •  Using IMsgStore
  •  Using IMsgServiceAdmin
  •  Using IProfAdmin
  • ...


ByRequest08EM  as Compiled Application
Source Code: In package
Request # 9
How to get access to Exchange Public folders from DELPHI

This example (By Request #9) will show you how to get access to public folders.
This example requires connection with Exchange Server for efficient implementation.

ByRequest09EM  as Compiled Application
Source Code: In package
Request # 10
Extended MAPI DCOM NT Server as Service

The idea behind this example is to implement a MAPI object that works as a COM Server in Windows NT Service.
Our MAPI COM Server will perform basic things - LogOn, LogOff and will take all the messages from the Inbox folder.

Start up parameters of this NT Service are PROFILENAME and PROFILEPASSWORD.
We will also create a test client enabling us to check how our server works.

Why do we need this example?
For instance, you may create a perfectly normal DCOM client with DELPHI that uses Extended MAPI and is placed on some user's computer. This client may have connection to GAL for instance or to Contacts Folders through our NT Service. This may be for instance the Front Desk girl for whom we need to install an e-mail client or it may be used by the HR department for updating data. This NT Service may also be used by ASP pages through VB scripts.

You can use also for better result SvCom package from ALDYN Software

SvCom is an integrated package of classes and tools for development of service applications and use of NT Security framework. Currently SvCom components work with Delphi 4, 5, 6, 7 and 2005 and C++ Builder 5 and 6 under all flavors of Windows.
...
procedure TMAPIActiveXService.ServiceBeforeInstall(Sender: TService);
begin
ServiceStartName := FindMySwitch('USERNAME', ['-', '/']);
LogMessage(ServiceStartName, 0);
Password := FindMySwitch('USERPASS', ['-', '/']);
end;

procedure TMAPIActiveXService.ServiceAfterInstall(Sender: TService);
begin
try
RegAction := raReg;
RegisterEXE;
RegisterAsService(GUIDToString(CLASS_MAPICOMServer), self.Name);
except
on e: Exception do if e.Message <> '' then
MessageBox(0, PChar(e.Message), 'MAPI ActiveX Service', MB_OK or MB_ICONERROR or MB_SERVICE_NOTIFICATION);
else
MessageBox(0, 'Can not install "MAPI ActiveX Service" service!', 'MAPI ActiveX Service', MB_OK or
MB_ICONERROR or MB_SERVICE_NOTIFICATION);
end;
end;
....

ByRequest10EM  as Compiled Application
Source Code: In package
Request # 11
Get all available Message Stores in our MAPI Profile


This example (By Request #11) will show you how to get access to all message stores listed in our MAPI profile. This includes also Delegated Mailbox.

This example requires connection with Exchange Server for efficient implementation.

ByRequest11EM  as Compiled Application
Source Code: In package
Request # 12
Exchange ACL (Modifying Access Rights) Public Folders Access Control

Access to Exchange server public folders is protected by custom mechanism. Although an object, which represents a folder in the Directory may have an associated Windows NT security descriptor with DACL in it, client access is controlled by an access control list of another kind. There is a bit of confusion here because both are called ACLs. The difference is that a Windows NT ACL specifies rights for Windows NT accounts, while a public folder ACL deals with MAPI PR_ENTRYIDs. I have a separate topic How NT Access Control Relates to Public Folder ACLs that describes where these two things come together. You can access public folder ACLs via either IExchangeFolderACLs interface, or IExchangeModifyTable. We have written
a few samples that illustrate both approaches. Also, MSDN has a sample named ACLEDIT, which illustrates usage of IExchangeFolderACLs. Access Rights The following code fragment extracted from the Edk.pas file lists documented access rights.

//Security bits
const
frightsReadAny = ULONG($0000001);
frightsCreate = ULONG($0000002);
frightsEditOwned = ULONG($0000008);
frightsDeleteOwned = ULONG($0000010);
frightsEditAny = ULONG($0000020);
frightsDeleteAny = ULONG($0000040);
frightsCreateSubfolder = ULONG($0000080);
frightsOwner = ULONG($0000100);
frightsContact = ULONG($0000200); 
rightsNone = ULONG($00000000);
rightsReadOnly = frightsReadAny;
rightsReadWrite = (frightsReadAny or frightsEditAny);
rightsAll = ULONG($00001FB); The table below explains their meanings:

Flags
Meaning
frightsReadAny A right to read any message in the folder. 
frightsCreate A right to create messages in the folder. 
frightsEditOwned A right to edit any message owned by a user.
frightsDeleteOwned A right to delete any message owned by a user.
frightsEditAny A right to edit any message in the folder.
frightsDeleteAny A right to delete any message in the folder.
frightsCreateSubfolder A right to create a subfolder in the folder.
frightsOwner Indicates that a user owns the folder.
frightsContact Indicates that a user is the contact person for the folder.
rightsNone No rights at all.
rightsReadOnly Same as frightsReadAny.
rightsReadWrite Combines frightsReadAny and frightsEditAny access.
rightsAll All documented rights with exemption of frightsContact.


In addition to these rights Exchange server uses flag $0000400, which determines folder visibility to a user. This flag is not a member of rightsAll.

Roles

Microsoft Exchange server uses a few roles for public folder clients. Roles are convenient combinations of individual access rights. The following roles are defined:

Role
Access Mask
Owner $000007FB
Publishing Editor $000004FB
Editor $0000047B
Publishing Author $0000049B
Author $0000041B
Nonediting Author $00000413
Reviewer $00000401
Contributor $00000402


You may easily determine which individual rights contribute to the role by examining it access mask.

Who May Be Listed in an ACL?

The following entities may be listed in a public folder ACL:
  • A user from Microsoft Exchange server address book.
  • A distribution list from Microsoft Exchange server address book.
  • A public folder.
  • A defined role.
  Using IExchangeModifyTable to Modify Public Foldr Access

Let us see how IExchangeModifyTable interface may be used to read and modify access control entries for a public folder. The following example application demonstrates reading and modifying access masks.

ByRequest12EM  as Compiled Application
Source Code: In package
Request # 13
Out Of Office (Auto Replay Message, Message Rule)

This step-by-step article describes how to create an out-of-office
rule with Extended MAPI.

 How to:
  • Turn On Rule
  • Turn Off Rule
  • Modify Message Text
  • Create a new Message Rule


This example requires connection with Exchange
Server for efficient running.

ByRequest13EM  as Compiled Application
Source Code: In package

 
 

Demo Extended MAPI in Delphi projects
(includes source of Exampl01, Exampl02, Exampl06 and DCU Library version)

Extended MAPI in Delphi 5 (~ 500 KB)
Extended MAPI in Delphi 6 (~ 500 KB)
Extended MAPI in Delphi 7 (~ 500 KB)
Extended MAPI in Turbo Delphi 2006 Explorer (~ 500 KB)
Extended MAPI in Delphi 2007 Win32 (~ 500 KB)
Demo Examples - Delphi 5, 6, 7, Turbo 2006 Explorer, 2007 Win32 (~ 2000 KB)
 
  REGISTRATION
 

After registration you will receive source code of examples and useful library.
Package do NOT includes components - we distributes RAW Pascal source code.
No *.DCU! No NAG screens!
Only RAW *.PAS files!

The DELPHI sources of Extended MAPI in DELPHI examples are delivered via electronic Internet download.

 

Valid MAPI profile to Microsoft Exchange Server are required for property starting of some examples.
Refund requests and Cancellation will not be accepted, and no refund will be granted.

  Register and unlock it

 
Customer Care Center and FAQ
 
Refund Policy and Cancellation
There is NO refund policy attached due to the nature of this package.
When you gain access to this source code, you have virtually unlimited possibilities of doing anything (or nothing) with it.
Having said that, we won't have any idea as to what you will do next.
So if you perceive this Policy as risky because of the "no refund" policy or don't have any solid plans with the source code or you are lazy "component based" developer, we would kindly advise you NOT to purchase this package.

All examples (compiled with Borland DELPHI 6) you can download from here (size: about 8,5 MB)

The Extended MAPI officially is NOT supported by Microsoft inside .NET Framework. That means that you cannot use our
source codes with DELPHI 8 / DELPHI 2005 dot NET. We cannot find reason our team to participate in this BIG experiment
named dot NET.
For more information please see the Microsoft web site -
Support policy for Microsoft Exchange APIs with the .NET Framework applications.

 

The Messaging API is a COM-like API that provides access to the contents of messaging stores. Using either CDO or MAPI, a program can connect to a MAPI store, and then perform operations against that store. Starting with Exchange 2007, Microsoft will distribute the MAPI client libraries and CDO 1.2.1 as a Web download -  Microsoft Exchange Server MAPI Client and Collaboration Data Objects 1.2.1  - from Microsoft WEB site

See also Down to the Metal (MAPI Service Providers in DELPHI)

 

We strongly recommends OutlookSpy the Ultimate Outlook Developer Tool.
Whether you work with Extended MAPI or Outlook Object Model or CDO, OutlookSpy will help you find exactly what you are looking for.
Integrated directly into Outlook, it provides fast and convenient access to virtually all Outlook Object Model objects, lets you examine values of the properties, call functions, browse object hierarchy and monitor Outlook events. CDO is supported too!
If you are a die-hard Extended MAPI developer or just curious about what really goes on under the hood, OutlookSpy will provide you with an access to the Extended MAPI interfaces that Outlook uses internally. See how Outlook data is stored, browse MAPI hierarchy, watch Extended MAPI notifications.

 

 
Looking for something specific that we don't currently offer?
Send us your Product Wish List and our developers will use your feedback when building the upcoming versions.

At IMIBO we'll be pleased to create this masterpiece of code which explicitly fits your needs.
We offer individual consulting services to optimize the organization of your development processes.  
Call us today!

 
 
 

Copyright © 2007 - 2009 ExtendedMAPI.COM
Send mail to webmaster@ExtendedMapi.com with questions or comments.
Privacy Statement