MailUpdateEx

This function, an extension of MailUpdate, replaces an entry in the message store with updated information and operates in a multiple folder hierarchy environment.

At a Glance

Header file: Msgstor2.h
Platforms: H/PC 3.0
Windows CE versions: 2.10 and later

Syntax

BOOL MailUpdateEx (HANDLE hMail, MailMsg* pmm, FID fid,
FID fidTarget, BOOL fDoAll);

Parameters

hMail
[in] Handle to the mail context. This handle is created by the MailOpen function.
pmm
[in] Pointer to the MailMsg structure that contains the mail entry with the updated information.
fid
[in] Folder identifier of the folder this function places the message in. Set fid to MAIL_FOLDER_NONE to keep the message in its current folder.
pfidTarget
[in] Pointer to the target folder identifier of a Copy or Move command. This parameter is only valid if the MAIL_STATUS_MOVE or MAIL_STATUS_COPY flags are set in the dwFlags member of MailMsg. Set pfidTarget to MAIL_FOLDER_NONE if you do not want this function to update the message that is being copied or moved.
fDoAll
[in] Boolean that is set to TRUE if this function updates all members of MailMsg, or to FALSE if this function updates only the dwFlags and wBodyLen members in MailMsg pointed to by pmm. Setting fDoAll to FALSE also updates the fid and pfidTarget parameters, if those parameters are not set to MAIL_FOLDER_NONE.

Return Values

TRUE indicates success. FALSE indicates failure. To get extended error information, call the function MailError or MailErrorMsg.

Remarks

This function changes the entry identified by the oid member of MailMsg. If the entry does not exist in the database, this function fails.

Treat any message that has the MAIL_STATUS_MOVE or MAIL_STATUS_COPY flag set as being located in the pfidTarget folder. This folder may differ from that indicated by fid because a client can attempt to move or copy a message from one folder to another while the client is not connected to a mail server. If this happens, the OS sets the MAIL_STATUS_MOVE or MAIL_STATUS_COPY flag in MailMsg. This function saves the target folder, along with MailMsg, in the store. When the device connects to the mail server, the Inbox client performs the move or copy on the server, then uses this function to clear the existing flag from MailMsg and to set the value of fid to the new target folder.

See Also

MailPut