Platform SDK: SMTP Server Events

ISmtpMaxMsgSize::OnSyncMaxMsgSize

[This is preliminary documentation and subject to change.]

Called by the SMTP event dispatcher for a message currently being processed that has content over the configured message size limit.

HRESULT OnSyncMaxMsgSize( 
   [in]  IUnknown            *pIUnknown,
   [in]  IMailMsgProperties  *pIMailMsgProp,
   [out] BOOL                *pfShouldImposeLimit 
);
pIUnknown
A reference to a Server object containing information about the SMTP virtual service processing the message.
pIMailMsgProp
A reference to a MailMsg object housing the message being processed. Such a message currently has content over the configured limit.
pfShouldImposeLimit
A flag from the sink indicating whether the limit should be imposed by the service, and NDRs sent to the message sender.

Return Values

Value Description
S_OK Success.

Remarks

To implement a sink that handles notifications of messages submitted to the transport with content over the maximum configured size, you implement a COM class that exposes the ISmtpMaxMsgSize interface. You then register a sink binding to receive notifications of the OnMaxMsgSize event. The corresponding COM category identifier for this event is CATID_SMTP_MAXMSGSIZE. The string version of this GUID is "{ebf159de-a67e-11d2-94f7-00c04f79f1d6}".

If your sink returns TRUE in the third parameter for this method, the message is discarded and a non-delivery receipt (NDR) is sent to the sender. If the sink returns FALSE, the message is not blocked and processing of the message by the transport continues.

See Also

IMailMsgProperties Interface