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
Parameters | Description |
---|---|
messageHandle | Handle identifying the message. This handle was obtained with a call to TCPIP_SMTPC_MailMessage(). |
pMailReport | Pointer to a TCPIP_SMTPC_MESSAGE_REPORT data structure containing the result of the message delivery. |
messageRes | The result of the message. |
errorStat | error status. |
messageWarn | Warnings. |
leftRetries | Number 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.