Print Page as PDF
MAILMAN: Initialize Mailman Environment ICR (1048)

MAILMAN: Initialize Mailman Environment    ICR (1048)

Name Value
NUMBER 1048
IA # 1048
DATE CREATED 1994/11/01
CUSTODIAL PACKAGE MAILMAN
CUSTODIAL ISC San Francisco
USAGE Supported
TYPE Routine
ROUTINE XMGAPI1
NAME MAILMAN: Initialize Mailman Environment
GENERAL DESCRIPTION
NOTICE!  NOTICE!  NOTICE!

XMGAPI1 is being RETIRED as a supported reference.  Use INIT^XMVVITAE instead.

This routine contains two application programmer entry points:

$$EN^XMGAPI1(DUZ,.HEADERS) which initializes mailman to access DUZ's mail
and is the preferred technique for programs to use.  OPTIONS should continue
to invoke EN^XM.

$$READ^XMGAPI1() which returns the "next" line in the body of a message
-- typically for a server
STATUS Retired
EXPIRATION DATE 2000/11/25
ID XMGAPI1
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION
$$EN
Purpose of $$EN^XMGAPI1: to initialize the MailMan
environment, e.g. set up all necessary variables and clean up the environment
for the user.

Note: It is not necessary to call the EN^XM entry point or the $$EN^XMAGAPI1
function when calling entry points to send or receive messages.  They are only
used when setting up one of the MailMan options as a separate option in the
entry action of the menu or option, and is for "Interactive" processes only.
They should also NOT be used to initialize MailMan variables when creating or
sending messages or bulletins.  Use the XMA2 entry points for these functions.


Usage:         =$$EN^XMGAPI1(DUZ,.HEADERS)

Parameters:    DUZ      Pointer to Person File record for recipient of
message
.HEADERS  Array into which you would like the MailMan header
for that user returned.  Inputs:        None
(!)

Returns:  # - meaning [Explanation]     [Both # and meaning are returned.]
Hint: EN=+$$EN D $S(EN=1:....). ]

1 - No DUZ           [No pointer to the Mail box]

2 - No Access Code   [In New Person record -- hence deny access]

3 - Mail box Maintenance Underway
[The Message file is locked and you can't send or reply]

4 - No Mail box   [There is no Mail box for the user specified pointer]

5 - Priority mail [There is Priority mail for this person]

6 - Message in Buffer [There was a partially created
message from this user detected]

7 - No Introduction [Site Parameters call for users to have
introductions and this user has none]

8 - No Person  [No entry for the Mail box pointer specified
in the New Person file]

Variables Initialized

XMDISPI Tells MailMan how to display different attributes for this user

XMDUN   The human readable name of the user

?      XMK     Mail box pointer

?      XMKN    Mail basket name

?      XMLOCK  Controls

XMNSEND Indicator that no "writes" (replies or new
messages) can be made for this session

?      XMY     Detailed Recipient chain

?      XMY0    Summary Recipient chain

?      XMZ     Message number



Description:

The function $$EN^XMGAPI1(DUZ,.HEADERS) initializes mailman to access person
DUZ's mail.  On exit, "HEADERS" contains a list of lines which hold the mail
system header for that user.  The number of lines returned depends on the
user.


Examples:

>W $$EN^XMGAPI1(DUZ,.WHAT)

>ZW WHAT WHAT=2 WHAT(1)=VA MailMan 7.2T1 service for LAST.FIRST@TCP1.REDACTED
WHAT(2)=You last used MailMan: 01 Nov 94 11:09


WHAT(3,4,...) could contain any number of lines, e.g. number of postmaster NEW
messages for postmaster surrogates.

ZW  (except for WHAT and XUP defined variables)

XMDISPI=XA^I XMDUN=LAST,FIRST XMDUZ=4 XMK=0 XMKN= XMLOCK= XMZ=0 XQXFLG=^^XUP
$$READ
Usage:       S X=$$READ^XMGAPI1()

Parameters:  None

Inputs:      XMZ    Message Number
XMPOS  Line Number

Outputs:     $$READ^XMGAPI1()   The "next" line (line XMPOS) in message XMZ
XMPOS              The number of the line returned
XMER   0 if function returns a line; -1 if no more line
numbers greater than XMPOS (which will normally be the
number of the last line and function returns "")


Description:

This function returns the "next" line after line XMPOS in the body of message
XMZ (and sets XMER=0) if there is such a line.  Otherwise, XMER is -1.  If
XMPOS is undefined or less than .99, it is set to .99. (REC^XMS3 does the real
work.)