MailOpen

The MailOpen function opens the message store and obtains a handle to the mail context.

Syntax

BOOL MailOpen (HANDLE * phNewMail, BOOL fAllowCreate,);

At a Glance

Header file: Msgstore.h
Platforms: H/PC
Versions: 1.0 and later

Parameters

phNewMail
Pointer to the handle created by MailOpen for identifying the mail context.
fAllowCreate
If this parameter is TRUE, MailOpen will attempt to create the message store if it does not already exist. If the message store cannot be created, or if the required system message folders cannot be created, MailOpen will fail.

If this parameter is FALSE and the message store does not exist, MailOpen will fail.

Return Values

This function returns TRUE if successful; FALSE if it fails. To get extended error information, call MailError or MailErrorMsg.

Remarks

Release the handle created by the MailOpen function with the MailClose function.

For more information, see Inbox.

See Also

MailClose