TCPIP_SMTPC_MESSAGE_CALLBACK Type

C

typedef void (* TCPIP_SMTPC_MESSAGE_CALLBACK)(TCPIP_SMTPC_MESSAGE_HANDLE messageHandle, const TCPIP_SMTPC_MESSAGE_REPORT* pMailReport);

Description

Type: TCPIP_SMTPC_MESSAGE_CALLBACK

Data type describing a function that will be called by the SMTPC module upon completion of the mail message.

Parameters

ParametersDescription
messageHandleHandle identifying the message. This handle was obtained with a call to TCPIP_SMTPC_MailMessage().
pMailReportPointer to a TCPIP_SMTPC_MESSAGE_REPORT data structure containing the result of the message delivery.
messageResThe result of the message.
errorStaterror status.
messageWarnWarnings.
leftRetriesNumber of times the delivery will be re-attemtped.

Remarks

A message handle is used rather than the user's TCPIP_SMTPC_MAIL_MESSAGE. This allows sending multiple copies of the message without waiting for a previous copy to be done.

This notification can be called multiple times if the delivery attempt failed for a transient reson. The number of left retries tells if another attempt will be retried.

Once this final notification function is called (left retries == 0), the SMTPC no longer uses the TCPIP_SMTPC_MAIL_MESSAGE data (unless there are other copies of this message in transit). This messageHandle is no longer valid and should not be used again.

The pMailReport points to a SMTPC owned read only data structure. It should be used only to inspect the message delivery result.