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 5)

Experimental # 1
MAPI .msg <-> MIME .eml
(MAPI-MIME Conversion API)

This "experimental" example allows conversions between MIME and MAPI messages. Starting with Microsoft Office 2003, Microsoft offers a COM library and interfaces as IConverterSession. Interface is not fully documented from Microsoft, but you are able to use it...

Experimental01EM as Compiled Application

Source Code: In package

Experimental # 2
"Smart" Mailer

Long time ago, we received a request for developing a very simple method for sending messages with attachments and HTML body.
We decided that the "best" solution will be a custom class based on TObject.

What's easier than that:

 // Send Message
  with TMailer.Create(Application) do
    SendMail(ListBoxTO.Items,  // TO recipients  - can be nil
             ListBoxCC.Items,       // CC recipients  - can be nil
             ListBoxBCC.Items,     // BCC recipients - can be nil
             ListBoxAttachements.Items, // Attachments - can be nil
             Trim(ebSubject.Text),          // Subject - optional
             BodyText,                // Message Body - Plain     - optional
             BodyHTML,               // or Message Body as HTML   - optional
             cbConfirmRead.Checked, // RECEIPT REQUESTED  - optional
             True           // Move to Sent Items folder??? - optional

Experimental02EM as Compiled Application

Source Code: In package

Smart Mailer
Experimental # 4
Public Free Busy

Do you know that:
 - Free/busy data is derived from calendar data and falls into four categories: Free, Busy, Tentative and Out of Office (OOF).
 - It is not necessary to "enumerate" each Mailbox to get those data
 - For an arbitrary user, you can generally access free/busy data in the Public Folders. You can to access the information directly from the IMAPIFolder Contents Table from the Public Folder.

The Public Folder Based Free/Busy data assumes that the server is configured to support public folders.

Experimental04EM as Compiled Application

Source Code: In package

Public Free Busy Info
Experimental # 5
We accept Microsoft Office Outlook Drag&Drop 

There is no need to use third-party components to implement Drag-And-Drop of Messages from Microsoft Office Outlook.
Preserving our understanding that all you need is available from Delphi and Windows, we offer this example. Just run it and Drag-And-Drop *.msg from the file system, or Message from Microsoft Office Outlook.

That is all ...

Experimental05EM as Compiled Application

Source Code: In package

We Accept Outlook DragAndDrop
Experimental # 6
What is the Best Body?

In the beginning, when the e-mail revolution was conceived - it was easy - the body of the messages was only as "simple" text.
Over time, a consumer wants to see the important things in messages in different ways, to have pictures, embedded objects ...
And of course, IT companies are responding to their wishes.
But this led to a situation in which messages contain "Plain", "Rich", "HTML" version of the body.
And this entire - for compatibility.
Currently, many developers ask:

"How to get the best format for the message body?"

What is the "Best"?

This example application is trying to answer all these questions.

More over:
 - There is not any third-party components for displaying HTML messages.
 - Pure virtual list - no need to downloads the entire list of received messages, it is not necessary to use auxiliary structures - let's MAPI to work for us - the fastest and most elegant way for the visualization of large lists - so that your Inbox may contain as few hundred or thousands of messages.
- Quickly and elegantly sorting by Subject, Sender, Date, Size, etc ... 

Note: Part of included code is based on Best Body Retrieval Protocol Specification

Experimental06EM as Compiled Application

Source Code: In package

Best Body - HTML Messages

click for enlarged view
Experimental # 7
Ole Attachments inside RTF?

"How to render Microsoft Office Excel Table or Microsoft Office Word document inside RTF Body?"

Embedded OLE attachments are valid only inside RTF formatted messages.

This example application is trying to answer all these questions.

Experimental07EM as Compiled Application

Source Code: In package

Rendering an Attachment in RTF Text

click for enlarged view
Experimental # 8
Working with Recurring Appointments

Experimental08EM 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