Platform SDK: SMTP Server Events |
[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 );
Value | Description |
---|---|
S_OK | Success. |
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.