PMDF Programmer's Reference Manual


Previous Next Contents Index


PMDFenqueueMessage

Submit a message to PMDF's message queues.

PASCAL

status = PMDF_enqueue_message (nq_context)

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

C

status = PMDFenqueueMessage (nq_context)

argument information


int PMDFenqueueMessage(PMDF_nq **nq_context) 


Arguments

nq_context

A message enqueue context created with PMDFstartMessageEnvelope.

Description

The final step in enqueuing a message is to call PMDFenqueueMessage. This call submits the message which was being composed and sends it on its way. Should an error occur, PMDFgetErrorText can be called to obtain further details about the error. Note that only temporary processing errors are reported (e.g., write errors to the disk occurred when creating the message file in the PMDF channel queue directory). When a permanent processing error occurs (e.g., message size exceeds site-imposed limits), PMDF automatically generates a non-delivery notification and sends it to the envelope "From:" address specified with PMDFstartMessageEnvelope. The non-delivery notification will show the address of each recipient address which failed with a permanent error. If the message is successfully enqueued as indicated by a return value of PMDF__OK or PMDF__NOOP, then PMDFenqueueMessage deletes the message context and nils (zeros) the context context pointer. If, however, an error occurs, the message context is not deleted. In that case PMDFabortMessage should be called to properly dispose of the message context. A new message enqueue context can be created with PMDFstartMessageEnvelope. That is, the process of submitting another message can be started with a call to PMDFstartMessageEnvelope.

Return Values

PMDF__OK Normal, successful completion.
PMDF__BADCONTEXT Illegal or corrupt context. Message not enqueued.
PMDF__FCRT File create error. The message could not be placed in the PMDF message queues. This is typically due to insufficient privileges although other possibilities exist such as insufficient disk space. Message not enqueued; message context not deleted. Delete with PMDFabortMessage.
PMDF__NO Message could not be delivered owing to temporary processing problems of some sort ( e.g., insufficient disk space to store the queued message).
PMDF__NOOP Message had no envelope "To:" addresses; its delivery was effected by simply deleting it.


Previous Next Contents Index