PMDF Programmer's Reference Manual


Previous Next Contents Index


PMDFstartMessageEnvelope

Begin a message enqueue; specify the envelope "From:" address.

PASCAL

status = PMDF_start_message_envelope

(nq_context, channel, from)

argument information
Argument Data type Access Mechanism
nq_context context pointer write reference
channel descriptor read reference
from descriptor read reference

C

status = PMDFstartMessageEnvelope

(nq_context, channel, channel_len, from, from_len)

argument information


int PMDFstartMessageEnvelope(PMDF_nq **nq_context, 
                             char     *channel, 
                             int       channel_len, 
                             char     *from, 
                             int       from_len) 


Arguments

nq_context

Message enqueue context created for this message enqueue context.

channel

Name of the channel to act as when enqueuing the message. Length can not exceed CHANLENGTH bytes.

channel_len

Length in bytes of channel.

from

Envelope "From:" address for the message to be enqueued. Length can not exceed ALFA_SIZE bytes.

from_len

Length in bytes of the envelope "From:" address.

Description

PMDFstartMessageEnvelope must be called to start a message enqueue context. No other message enqueue API procedures can be called until after PMDFstartMessageEnvelope has been called. For programs which act as a user interface, the local channel name, l, should be used for the channel argument. Channel programs should use their own channel name. If a zero length string is passed in, then "l" will be used if the ischannel argument of PMDFinitialize was false; otherwise, PMDFgetChannelName will be called to determine the current channel name and that will be used. The from argument specifies the envelope "From:" address to associate with the message to be enqueued. An envelope "From:" address must be specified and should conform to RFC 822. PMDF will do its best to transform non-conformant addresses into legal RFC 822 addresses; however, this is not always possible and a PMDF__NO error can result. After calling PMDFstartMessageEnvelope, PMDFaddRecipient should be called to specify all "To:", "Cc:", and "Bcc:" addresses.

Return Values

PMDF__OK Normal, successful completion.
PMDF__INVSTRDES Invalid string descriptor for channel or from: one or both of the descriptors has an invalid value in its DSC$B_CLASS field. Message enqueue context not started.
PMDF__NO Error initializing PMDF. Either the specified channel does not exist or a problem exists with the site's PMDF configuration ( e.g., duplicate channel name in the configuration file). PMDFgetErrorText can be called to obtain additional information about the nature of the error.
PMDF__STRTRUERR One or both of the input strings is too long. Message enqueue context not started.


Previous Next Contents Index