Share via


MailSyncMessages (Compact 7)

3/12/2014

The MailSyncMessages function synchronizes the messages for the specified account.

Syntax

HRESULT MailSyncMessages(
  LPCTSTR pszAccount, 
  DWORD dwFlags
);

Parameters

  • pszAccount
    [in] The account to synchronize. It can be specified either by its name or by the name of the transport, determined by the flag set in the dwFlags parameter. If this parameter is NULL, the current account is synchronized.
  • dwFlags
    [in] Flags used to specify whether the pszAccount parameter contains the name of the account or the name of the transport. Also allows the synchronization to run in the background. See MAPI Compose Field Flags for possible values.

Return Value

This function returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

  • S_OK
    The call succeeded.

Remarks

Cemapi.lib exports functions in conformance with C++ standards; as C functions, not C++ functions.

The MailSyncMessages function is asynchronous, which mean it can return before the synchronization actually takes place.

No error is returned to the MailSyncMessages function if there was an error during synchronization.

To use MailSyncMessages to send SMS messages waiting in the Outbox, the Messaging Application (tmail.exe) must be running.

Requirements

Header

cemapi.h

Library

cemapi.lib

See Also

Reference

MAPI Functions