Previous | Contents | Index |
Specify the envelope id to associate with this message.
status = PMDF_set_envelope_id
(nq_context, envelope_id)
Argument Data type Access Mechanism nq_context context pointer read/write reference envelope_id descriptor read reference
status = PMDFsetEnvelopeId
(nq_context, envelope_id, envelope_id_len)
int PMDFsetEnvelopeId(PMDF_nq **nq_context, char *envelope, int envelope_id_len)
nq_context
A message enqueue context created withPMDFstartMessageEnvelope
.envelope_id
Envelope id to use for this message. Length can not exceedALFA_SIZE
bytes.envelope_id_len
Length in bytes of the envelope id.
Messages queued to PMDF carry with them two identification strings -- "id's" for short. The first is the "message id" as seen in the message's RFC 822 "Message-id:" header line. This id is the same for all copies of a given message. The second id is the envelope id. Each copy of the message has a distinct envelope id. Normally you will only specify these id's yourself when you are re-enqueuing a message to PMDF. In that case, it is important to preserve the envelope id and message id. If you are enqueuing a new message to PMDF, then you should just leave generation of these id's to PMDF: PMDF will automatically generate both of these id's when they are not supplied. Should you want to set the message id, then include your own Message-id: header line in the enqueued message's RFC 822 header. If you want to set the envelope id, then do so with this routine. Note, however, that if PMDF has to make multiple copies of the enqueued message, then it is likely that your specified envelope id will not be used. Your message id, however, will be used since a message id is identical across all copies of the message. When re-enqueuing a dequeued message to PMDF, you can get obtain the envelope id and NOTARY flags of the dequeued message via thePMDFgetEnvelopeId
andPMDFgetRecipientFlags
routines. You would then propogate the id and flags forward by callingPMDFsetEnvelopeId
once afterPMDFstartMessageEnvelope
, and by callingPMDFsetRecipientFlags
once for each, and prior to each,PMDFaddRecipient
call.
PMDF__OK Normal, successful completion. PMDF__BADCONTEXT Illegal or corrupt context. No envelope id set. PMDF__INVSTRDES Invalid string descriptor for envelope_id: descriptor has an invalid value in its DSC$B_CLASS field. Envelope id not set. PMDF__STRTRUERR Supplied string was too long. Envelope id not set.
Previous | Next | Contents | Index |