Are you a world traveler? ZoneTick is a cool utility that'll help you stay in touch over multiple time zones!
 
MSMQ MAPI Transport Provider  
Nik Okuntseff  MS Exchange Server Programming 

MSMQ MAPI Transport Provider

MSMQ MAPI transport provider delivers easy connectivity between MAPI clients and message queues. If you install this transport, you will be able to use a MAPI client such as the Outlook to send e-mails through MSMQ. This transport plays an intermediate role between MAPI and MSMQ interfaces. It does necessary conversions of properties between the two. A message may be composed by a MAPI client, the transport then converts MAPI properties into a binary stream of data and puts it in a message queue. Incoming messages arrive as binary blocks to a message queue, the transport reads them, converts to MAPI properties and notifies the client.
 

Installing and Configuring MSMQ MAPI transport:

The setup program for MSMQ client or server (at the moment of this writing it comes with Windows NT 4.0 Option Pack) installs MSMQ MAPI transport provider (mqxp32.dll) on the system. Setup modifies the MAPISVC.INF file accordingly. You'll need to add it to your MAPI profile (right click on the Inbox, click Add and select Microsoft Message Queue).

Alternative way to install this transport provider is to run the setup program from Msmq\MQMail\mapixp\setup directory of Windows NT 4.0 Server 4.0 Enterprise edition Disk 2 (Disk 15 of Back Office Test Platform - U.S.).
 

Setting up Inbound and Outbound Message Queues:

It is not necessary to create an inbound message queue for the transport. When the transport is added to a user's profile and started it will create an inbound message queue for itself if it is not already available. The queue's label will be user's account name, the queue pathname will be ComputerName\UserAccountName_mqxp, and its type ID will be {5EADC0D0-7182-11CF-A8FF-0020AFB8FB50}.

However, you need to set up an outbound message queue. Use Message Queue Explorer to create the queue with any pathname and label you like. The label will be later used as the recipient's E-mail address. One trick to remember is the following: the queue's type ID must be:

{5EADC0D0-7182-11CF-A8FF-0020AFB8FB50}

Just cut and paste this from here to the queue's properties. Message Queue Explorer puts zeroes for type ID by default.
 

Testing MSMQ MAPI transport:

You'll need to create a custom address of type "MSMQ" in order to test this transport. To do this: open the address book, create a new "Other Address" entry, and specify MSMQ for its E-mail type. You may use any convenient string for the Display Name. The Display name does not really matter. E-mail address, however, should be equal to the outbound message queue label. If such queue does not exist, then sending a message to this recipient will result in an NDR with the following explanation: "The queue was not found."

Now you will be able to send e-mail messages to this queue. Compose a message, address it to your custom recipient and send. Observe it appear in the queue after a short while. You may wish to examine its properties with Message Queue Explorer. It would allow you to see first 256 bytes.

Using this simple technique I have connected my Outlook client with a message queue. Now any MSMQ application (including the Mqapitst from the samples) would be able to read messages from it. Notice that there is no MAPI programming involved here at all. This makes the technique attracting.
 

[ Contents | Home ]

Send comments and suggestions to niko@wrconsulting.com
Copyright © 1997-1998 by Nik Okuntseff