Platform SDK: Exchange Server

Formatting the POPPST.INI File

POPPST is used to create a new personal folder store (PST) and to populate it with messages. Alternately, you can use it to add test messages to a new PST if the NEWPST section is commented out and the PROFILE section is activated.

To replace the NEWPST section with the PROFILE section

  1. Remove the comment symbols (;) from the beginning of each line in the PROFILE section.
  2. Replace the name of the profile with an existing profile.
  3. Add comment symbols to the beginning of each line in the NEWPST section.

The POPPST.INI file below will create a new PST and populate it with one message:

;  poppst.ini
;  Sample INI input file forthe POPPST.EXE sample application
;  
;  Notes: The [profile] and [newpst] sections are mutually exclusive.
;      See the poppst.cpp file for more .INI file syntax information
;  [profile]
;  NAME=User Twenty-two 
;  PASSWORD=

[newpst]
NAME=Mailbox - Personal
ENCRYPTION=OFF
PASSWORD=
PATH=POPPST.PST

[message 1]
FROM=Jerry Wheeler
TO=None Two
BCC=Jerry Wheeler
FOLDER=Top of Information Store\Inbox
SUBJECT=POPPST Test Message 02/21/95-1
XTEXT=Body.Text
DATE=1996-02-01
TIME=10:25
PRIORITY=Normal
XATTACH=POPPST.INI
 

The default rights value for mail messages created with POPPST is set to READ. To create unread messages, you can modify the source code. Assuming you have just opened the message, you can use the MAPI IMessage::SetReadFlag method by adding code such as the following:

ASSERTERROR( lpMessage != NULL, "Invalid lpMessage!");
hr = MAPICALL(lpMessage)->SetReadFlag(lpMessage,
    CLEAR_READ_FLAG | MAPI_DEFERRED_ERRORS);
if( FAILED( hr))
    goto cleanup;

You can also add additional messages. To view the new PST from the client, it must be associated with an active profile.