IMsgStore::NotifyNewMail

Applies to: Outlook 2013 | Outlook 2016

Informs the message store that a new message has arrived. This method is called only by the MAPI spooler.

HRESULT NotifyNewMail(
  LPNOTIFICATION lpNotification
);

Parameters

lpNotification

[in] A pointer to a NOTIFICATION structure that describes the new message notification.

Return value

S_OK

The message store was successfully notified.

Remarks

The IMsgStore::NotifyNewMail method is called by the MAPI spooler to inform the message store that a message is ready for delivery.

Notes to implementers

When NotifyNewMail is called, send a new mail notification to all registered clients. You can send the notification by calling IMAPISupport::Notify, if you elect to use the support object methods, or by using your own implementation. A registered client is one that has called IMsgStore::Advise and set the lpEntryID parameter to NULL and the ulEventMask parameter to fnevNewMail.

Do not modify or free the memory for the NOTIFICATION structure that describes the new mail notification. Copy the NOTIFICATION structure by calling the utility function ScCopyNotifications to make use of the information in its members.

See also

IMAPISupport::Subscribe

IMAPISupport::Unsubscribe

NOTIFICATION

ScCopyNotifications

IMsgStore : IMAPIProp