PMDF Programmer's Reference Manual


Previous Next Contents Index


PMDFsetEnvelopeId

Specify the envelope id to associate with this message.

PASCAL

status = PMDF_set_envelope_id

(nq_context, envelope_id)

argument information
Argument Data type Access Mechanism
nq_context context pointer read/write reference
envelope_id descriptor read reference

C

status = PMDFsetEnvelopeId

(nq_context, envelope_id, envelope_id_len)

argument information


int PMDFsetEnvelopeId(PMDF_nq **nq_context, 
                      char     *envelope, 
                      int       envelope_id_len) 


Arguments

nq_context

A message enqueue context created with PMDFstartMessageEnvelope.

envelope_id

Envelope id to use for this message. Length can not exceed ALFA_SIZE bytes.

envelope_id_len

Length in bytes of the envelope id.

Description

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 the PMDFgetEnvelopeId and PMDFgetRecipientFlags routines. You would then propogate the id and flags forward by calling PMDFsetEnvelopeId once after PMDFstartMessageEnvelope, and by calling PMDFsetRecipientFlags once for each, and prior to each, PMDFaddRecipient call.

Return Values

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