Information associated with an ongoing message dequeue may be obtained with mtaDequeueInfo(). The information to obtain is specified through the use of item codes.
The pointers returned by mtaDequeueInfo() are only valid during the life of the dequeue context. Once the dequeue has been completed for that particular message, the pointers are no longer valid.
Item Codes |
Additional Arguments |
Description |
---|---|---|
MTA_CHANNEL |
const char **channel size_t *channel_len |
Obtain the name of the channel for which messages are being dequeued. The channel name will be NULL terminated. This item code must be followed by two additional call arguments:
|
MTA_DELIVERY_FLAGS |
size_t *dflags |
Return the envelope delivery flags for either the entire message or for a particular recipient. If called before the first call to mtaDequeueRecipientNext(), then the delivery flags for the entire message are returned. If called after the first call to mtaDequeueRecipientNext(), then the delivery flags are returned for the most recently reported envelope recipient address. The value of the delivery flags is a logical OR of the deliveryflags channel keyword values on each channel the message has been enqueued to as it flows through the MTA. This item code must be followed by one additional call argument, the address of a size_t to receive the delivery flag setting. |
MTA_DOMAIN |
const char **domain size_t *domain_len |
Retrieve the destination domain name, if any, the Job Controller has associated with this dequeue thread. When the channel is marked with the single_sys channel keyword, then the Job Controller tries to give each dequeue thread for that channel all messages destined for the same host as determined by the domain name in the recipient envelope addresses. This item code must be followed by two additional call arguments:
|
MTA_ENV_ID |
const char **env_id size_t *env_id_len |
Obtain the envelope ID associated with this message. If the message was submitted to the MTA using the SMTP NOTARY extension (RFC 1891), then this will be the value of the ENVID parameter supplied with the SMTP MAIL FROM command. In all other cases, it will be an envelope ID assigned by the MTA. This item code must be followed by two additional call arguments:
|
MTA_ENV_TO |
const char **env_to size_t *env_to_len |
Return the envelope recipient address last returned by mtaDequeueRecipientNext(). If that routine has not yet been called for the dequeue context, then an MTA_NO error code will be returned. This item code must be followed by two additional call arguments:
|
MTA_ENV_FROM |
const char **env_from size_t *env_from_len |
Obtain the envelope From: address for the message. It is possible for this to be an empty string (that is, a string of zero length). This is not uncommon and is mandated by Internet standards for automatically generated notification addresses. Notifications must never be sent for messages with an empty envelope From: address. The MTA SDK adheres to this rule when generating any requested notification messages. This item code must be followed by two additional call arguments:
|
MTA_IRCPT_TO |
const char **ircpt_to size_t *ircpt_to_len |
Return the intermediate form of the last envelope recipient address returned by mtaDequeueRecipientNext(). If that routine has not yet been called for the dequeue context, then an MTA_NO error code will be returned. This item code must be followed by two additional call arguments:
|
MTA_ITEM_LIST |
mta_item_list_t*item_list |
Specify a pointer to an item list array. The item list array must be terminated with a final array entry with an item code value of zero. For further information on item list usage, see Item Codes and Item Lists. |