Platform SDK: SMTP Server Events

ISMTPStoreDriver::LocalDelivery

[This is preliminary documentation and subject to change.]

The ISMTPStoreDriver::LocalDelivery method is called by the SMTP service to deliver a local message with optional asynchronous completion.

HRESULT LocalDelivery(
  [in] IMailMsgProperties *pMsg,
  [in] DWORD dwRecipCount,
  [in,size_is(dwRecipCount)] DWORD *pdwRecipIndexes,
  [in,unique] IMailMsgNotify *pNotify
);
pMsg
A reference to the MailMsg object containing the message to be delivered.
dwRecipCount
The number of MailMsg recipients for this delivery.

pdwRecipIndexes

An array of the MailMsg object recipient indexes.

pNotify

Interface to notify for asynchronous completion. If this value is NULL, then the method will complete synchronously. If this value is non-NULL, the method may still complete synchronously (i.e. it may return S_OK instead of MAILMSG_S_PENDING).

Return Values

Value Description
S_OK Success. The method completed synchronously.
MAILMSG_S_PENDING Success. The operation will complete asynchronously. When it completes, you will be notified through the interface you passed using the pNotify parameter. The result of the operation will be returned with the notification callback method.

Remarks

When a MailMsg object has been categorized and is deemed to contain recipients that have mailbox storage on the local system, the SMTP service calls the ISMTPStoreDriver::LocalDelivery method on the store driver object. The store driver in turn copies the message contents into its provided local storage. Each local recipient must receive a copy (or reference) to the delivered message. For example, the default SMTP (NTFS) store driver copies the message contents into the SMTP Drop directory, and places an x-receiver header at the top of the message content stream for each local recipient of the message.

See Also

IMailMsgNotify Interface

IMailMsgNotify.Notify