MailPut

The MailPut function creates a new mail entry in the message store.

Syntax

BOOL MailPut (HANDLE hMail, MailMsg*pmm);

At a Glance

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

Parameters

hMail
Handle to the mail context. This handle is created by the MailOpen function.
pmm
Pointer to the MailMsg structure containing the information for the new entry. MailPut ignores the dwMsgID member of the MailMsg structure.

Return Values

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

Remarks

If the MailPut function is successful, the oid member of the MailMsg structure is set with a unique identification number for this mail entry. The oid can be used by other mail functions to reference this entry.

MailPut is for adding new entries to the message store. To change existing entries, use the MailUpdate function.

If necessary, a caller should set the pwcHeader field of the MailMsg structure by calling the MailSetField function. This ensures a proper initialization of the hHeap pointer in the MailMsg structure. Otherwise, MailPut will return an error.

For more information, see Inbox.

See Also

MailGet, MailMsg