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
 
 

Extended MAPI in DELPHI Examples Examples (page 6)

   
  Lazy MAPI
  This part of our examples is aimed to those developers who do not want or do not have time to go deeper into Extended MAPI. Especially for them we have developed a set of functions and declarations by which they can rapidly develop their MAPI applications.
These opportunities are developed through units IMIEMTypes, MAPIBestBody, MAPISessionUtils, MAPIFldUtils, MAPIMsgUtils, and many others.

Also, this section contains several forms that are specifically designed for testing and visualization results such as:
   
Lazy MAPI # 1
Test MAPI Folder/Message functions

This "test" application show how developer can uses functions GetMAPISession, GetDefaultStore, ReleaseMapiSession, ReleaseMsgStore, GetInbox, GetSentBox, GetDefaultFolder, GetMessageList, GetMapiMessage, CreateMapiMessage, TMsgHeadList...

and

GetMsgBodyPlain, GetMsgBodyRTF, GetMsgBodyHTML, ShowHTMLBodyRendered, GetMsgSenderName, GetMsgToNames, GetMsgCcNames, GetMsgSubject, GetMsgSentTime, GetMsgSize, GetMsgHasAttachment, GetBestBodyFormat, GetMsgInetCodePage, GetMsgAttCount, GetMsgAttList, GetRecipientsFromAB, GetMsgRecipients, GetMsgAfterSendAction, AddMsgAttachment, SetMsgRecipients, SetMsgSubject, GetNamedPropString, SetNamedPropString, TAttHeadList...

uses "shared" forms:

TFrmMessage, TFrmNewMsg, TFrmAttachments, TFrmPropPage, TFrmProperty


The Lazy MAPI # 1 (main source code snip)


LazyMAPI01 as Compiled Application

Source Code: In package

LazyMAPI 01 Main Form
Lazy MAPI # 2
Test Session/Store/Folder Functions

This "test" application show how developer can uses functions
GetProfiles, GetMAPISession, ReleaseMapiSession, GetMAPIStores, ReleaseMsgStore, GetFoldersRoot, GetMAPIFolder, GetMAPIFolderKnowType, IsSpecialFolder, CreateMapiSubFolder, DeleteMapiSubFolder, CopyOrMoveMapiSubFolder, EmptyMapiFolder, GetMsgTable, GetTableRowCount, DeleteMapiMessages, CopyOrMoveMapiMessages

and

TStoreHead, TStoresHeadList, TFolderHead, TFoldersHeadList, TMsgHead, TMsgHeadList

uses "shared" forms:

TFrmNewFolder, TFrmFolderCopyMove

The Lazy MAPI # 2 (main source code snip)

 
LazyMAPI02 as Compiled Application


Source Code: In package

Test Session/Store/Folder Functions
Lazy MAPI # 3
Test Microsoft Office Outlook Account Management (read-only)

A "test project" - how to use the IOlkAccountManger to get email accounts configured in Outlook.

The Lazy MAPI # 3 (main source code snip)

LazyMAPI03 as Compiled Application

Source Code: In package

Test Microsoft Office Outlook Account Management
Lazy MAPI # 4
Test Message Smart Filter 

The TFrmSmartFilterDialog form and developed TSmartFilter object will allows you to restrict messages inside content table to these where:
  • Message Subject contains any substring
  •  Sender Display Name or Sender E-mail Address contains any substring
  • Recipient Display Name or Sender E-mail Address contains any substring
  • Is received Before/After/Between any Date
  • Size is Greater than  XXXXX  bytes
  • Body contains any substring
  • Read/UnRead 
The Lazy MAPI # 4 (main source code snip)


That is all ...

LazyMAPI04 as Compiled Application

Source Code: In package

Test Message Smart Filter
Lazy MAPI # 5
Test MAPI Property Fields

With developed simple Delphi object TMAPIPropFields, from now, you can inspect and modify IMAPIProp properties, including also multi-valued properties.

usage:

 
var MAPIProp: IMAPIProp;
  if not Assigned(MAPIProp) then
    ShowMessage('There is no selected object!')
  else
  begin
    PropFields := TMAPIPropFields.Create(MAPIProp);
    try
      with TFrmMAPIPropFields.Create(Self) do
      begin
        try
          SetPropFields(PropFields);
          ShowModal;
        finally
          Free;
        end;
      end;
    finally
      FreeAndNil(PropFields);
    end;
  end;


LazyMAPI05 as Compiled Application

Source Code: In package

Test MAPI Property Fields
Lazy MAPI # 6
Test TMAPITable wrapper, FastFilter and FastSort

With this example, we intoduce the Delphi TMAPITable class, which is IMAPITable wrapper.
It does not cover all of the properties and functions of IMAPITable, but provides easy access "in Delphi way".


The Lazy MAPI # 6 (main source code snip)



LazyMAPI06 as Compiled Application


Source Code: In package


Lazy MAPI # 7
Test TMAPITable wrapper, FastFilter and FastSort (with Events)

Also  includes how to use the TMAPITableAdvise class.
Includes event handling, as a new entry, delete entry, change the record, etc.


LazyMAPI07 as Compiled Application


Source Code: In package
   
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.
   
 
The Next Extended MAPI in Delphi Examples
Copyright © 2021 IMIBO
Privacy Statement