- XMXAPI ;ISC-SF/GMB-Message APIs ; 4/2/09 10:11am
- ;;8.0;MailMan;**15,41**;Jun 28, 2002;Build 4
- ; All entry points covered by DBIA 2729.
- ; Variables input:
- ; XMATTACH Imaging system BLOB attachment array
- ; XMBODY Message text (MUST NOT BE "XMBODY")
- ; (must be closed root, passed by value. See WP_ROOT
- ; definition for WP^DIE(), FM word processing filer)
- ; XMDUZ User's DUZ, or enough of user's name for a positive ID
- ; eg: 1301 or "lastname,firs"
- ; XMK Basket number, or enough of a name for a positive ID
- ; eg: 1 or "IN"
- ; XMKZ Message number in basket XMK
- ; OR
- ; if $G(XMK)="", Message number in ^XMB(3.9
- ; XMKZA Message number list or list array in basket XMK
- ; eg: "1,3,5-7" or ARRAY("1,3")=""
- ; ARRAY("5-7")=""
- ; (list may end in comma)
- ; (ARRAY must be passed by reference)
- ; OR
- ; if $G(XMK)="", Message number list or list array in ^XMB(3.9
- ; (same rules, but number ranges are NOT allowed)
- ; XMSUBJ Message subject
- ; XMTO Addressee or addressee array
- ; (array must be passed by reference)
- ; User's DUZ, or enough of user's name for a positive ID
- ; eg: 1301 or "lastname,firs" or ARRAY(1301)=""
- ; ARRAY("lastname,firs")=""
- ; G.group name (enough for positive ID)
- ; S.server name (enough for positive ID)
- ; D.device name (enough for positive ID)
- ; prefix above (except devices and servers) by:
- ; I: for 'information only' recipient (may not reply)
- ; eg: "I:1301" or "I:lastname,firs"
- ; C: for 'copy' recipient (not expected to reply)
- ; eg: "C:1301" or "C:lastname,firs"
- ; L@datetime: for when (in future) to send to this recipient
- ; (datetime may be anything accepted by FM)
- ; eg: "L@25 DEC@0500:1301" or "L@1 JAN:lastname,firs"
- ; or "L@2981225.05:1301"
- ; (may combine IL@datetime: or CL@datetime:)
- ; To delete recipient, prefix by -
- ; eg: -1301 or "-lastname,firs"
- ; XMZ message number in ^XMB(3.9,
- ;
- ; Variables output (must be passed by reference):
- ; XMFULL expanded address of last addressee
- ; XMMSG simple message telling how many messages were acted on
- ; XMZ message number created in ^XMB(3.9,
- ;
- ; Errors
- ; XMERR if there's any errors, then XMERR is set to the number of
- ; errors, otherwise XMERR is undefined.
- ; ^TMP("XMERR",$J,error number,"TEXT",line number)=error text
- ANSRMSG(XMDUZ,XMK,XMKZ,XMSUBJ,XMBODY,XMTO,XMINSTR,XMZR) ; Answer a msg (Send new msg with copy of original msg inside)
- ; In: User, basket, msg #
- ; Out: XMZR (message number of answer)
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
- D ANSRMSG^XMXPARM(.XMDUZ,.XMK,.XMKZ,.XMSUBJ,.XMBODY,.XMTO,.XMINSTR) Q:$D(XMERR)
- D ANSRMSG^XMXANSER(XMDUZ,.XMK,XMKZ,.XMSUBJ,XMBODY,.XMTO,.XMINSTR,.XMZR)
- Q
- DELMSG(XMDUZ,XMK,XMKZA,XMMSG) ; Delete msgs from a basket
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
- D ACTMSGS^XMXPARM(.XMDUZ,.XMK,.XMKZA) Q:$D(XMERR)
- D DELMSG^XMXMSGS(XMDUZ,.XMK,.XMKZA,.XMMSG)
- Q
- FLTRMSG(XMDUZ,XMK,XMKZA,XMMSG) ; Filters msgs in a basket
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
- D ACTMSGS^XMXPARM(.XMDUZ,.XMK,.XMKZA) Q:$D(XMERR)
- D FLTRMSG^XMXMSGS(XMDUZ,.XMK,.XMKZA,.XMMSG)
- Q
- FWDMSG(XMDUZ,XMK,XMKZA,XMTO,XMINSTR,XMMSG) ; Forward msgs
- ; XMINSTR("SHARE DATE")
- ; XMINSTR("SHARE BSKT")
- ; XMINSTR("SELF BSKT")
- ; XMINSTR("FWD BY") substitute any string instead of XMDUZ name
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
- D FWDMSG^XMXPARM(.XMDUZ,.XMK,.XMKZA,.XMTO,.XMINSTR) Q:$D(XMERR)
- D FWDMSG^XMXMSGS(XMDUZ,.XMK,.XMKZA,.XMTO,.XMINSTR,.XMMSG)
- Q
- LATERMSG(XMDUZ,XMK,XMKZA,XMINSTR,XMMSG) ; Later msgs
- ; XMINSTR("LATER")
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
- D LATERMSG^XMXPARM(.XMDUZ,.XMK,.XMKZA,.XMINSTR) Q:$D(XMERR)
- D LATERMSG^XMXMSGS(XMDUZ,.XMK,.XMKZA,.XMINSTR,.XMMSG)
- Q
- MOVEMSG(XMDUZ,XMK,XMKZA,XMKTO,XMMSG) ; Move msgs from one basket to another
- ; XMKTO Basket number, or enough of a name for a positive ID.
- ; Identifies basket to move to
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
- D MOVEMSG^XMXPARM(.XMDUZ,.XMK,.XMKZA,.XMKTO) Q:$D(XMERR)
- D MOVEMSG^XMXMSGS(XMDUZ,.XMK,.XMKZA,XMKTO,.XMMSG)
- Q
- NTOGLMSG(XMDUZ,XMK,XMKZA,XMMSG) ; New Toggle msgs
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
- D ACTMSGS^XMXPARM(.XMDUZ,.XMK,.XMKZA) Q:$D(XMERR)
- D NTOGLMSG^XMXMSGS(XMDUZ,.XMK,.XMKZA,.XMMSG)
- Q
- PRTMSG(XMDUZ,XMK,XMKZA,XMPRTTO,XMINSTR,XMMSG,XMTASK,XMSUBJ,XMTO) ; Print msgs
- ; XMINSTR("HDR"), "RESPS", "RECIPS", "WHEN"
- ; XMPRTTO Printer name
- ; XMSUBJ & XMTO used only if XMPRTTO is a P-MESSAGE device. Even then, they're optional.
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
- D PRTMSG^XMXPARM(.XMDUZ,.XMK,.XMKZA,.XMPRTTO,.XMINSTR,.XMSUBJ,.XMTO) Q:$D(XMERR)
- D PRTMSG^XMXMSGS(XMDUZ,.XMK,.XMKZA,XMPRTTO,.XMINSTR,.XMMSG,.XMTASK,.XMSUBJ,.XMTO)
- Q
- PUTSERV(XMKN,XMZ) ; Put a message in a server basket
- ; XMKN full server name, including "S."
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- D SERV^XMXPARMB(.XMKN,.XMZ) Q:$D(XMERR)
- D PUTSERV^XMXMSGS1(XMKN,XMZ)
- Q
- REPLYMSG(XMDUZ,XMK,XMKZ,XMBODY,XMINSTR,XMZR) ; Reply to msg (Attach reply to original msg)
- ; XMINSTR("NET REPLY") 1=send over the network; 0=don't (default)
- ; XMINSTR("NET SUBJ") Network Reply subject (see XMSUBJ)
- ; Out: XMZR (message number of answer)
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
- D REPLYMSG^XMXPARM(.XMDUZ,.XMK,.XMKZ,.XMBODY,.XMINSTR) Q:$D(XMERR)
- D REPLYMSG^XMXREPLY(XMDUZ,.XMK,XMKZ,XMBODY,.XMINSTR,.XMZR)
- Q
- SENDBULL(XMDUZ,XMBN,XMPARM,XMBODY,XMTO,XMINSTR,XMZ,XMATTACH) ; Send a bulletin (returns XMZ)
- ; In: User, bulletin name, bulletin parameters, add'l text,
- ; add'l recipients, send now or later (when?), opt'l BLOB
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
- D BULLETIN^XMXPARM(.XMDUZ,.XMBN,.XMPARM,.XMBODY,.XMTO,.XMINSTR,.XMATTACH) Q:$D(XMERR)
- D SENDBULL^XMXBULL(XMDUZ,XMBN,.XMPARM,.XMBODY,.XMTO,.XMINSTR,.XMZ,.XMATTACH)
- Q
- SENDMSG(XMDUZ,XMSUBJ,XMBODY,XMTO,XMINSTR,XMZ,XMATTACH) ; Send a msg
- ; In: User, basket (if you are recipient), all msg parts,
- ; priority?, closed?, (info?,cc?), send now or later (when?),
- ; (KIDS,MIME,text,PackMan), delete date (if to shared,mail)
- ; XMINSTR("RCPT BSKT")
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
- D SENDMSG^XMXPARM(.XMDUZ,.XMSUBJ,.XMBODY,.XMTO,.XMINSTR,.XMATTACH) Q:$D(XMERR)
- D SENDMSG^XMXSEND(XMDUZ,XMSUBJ,XMBODY,.XMTO,.XMINSTR,.XMZ,.XMATTACH)
- Q
- TASKBULL(XMDUZ,XMBN,XMPARM,XMBODY,XMTO,XMINSTR,XMTASK,XMATTACH) ; Send a bulletin (Task it - does not return XMZ)
- ; XMBN Bulletin name (must be full name)
- ; XMPARM Array of parameters necessary for bulletin
- ; ARRAY(1)="parameter 1"
- ; ARRAY(2)="parameter 2"
- ; XMBODY Additional text to append to the bulletin text
- ; (must be closed root, passed by value. See WP_ROOT
- ; definition for WP^DIE(), FM word processing filer)
- ; XMTO Additional addressee(s)
- ; XMINSTR("SELF BSKT")
- ; ***ETC.***
- ; In: User, bulletin name, bulletin parameters, add'l text,
- ; add'l recipients, send now or later (when?), opt'l BLOB
- ; Out: XMTASK (task number)
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
- D BULLETIN^XMXPARM(.XMDUZ,.XMBN,.XMPARM,.XMBODY,.XMTO,.XMINSTR,.XMATTACH) Q:$D(XMERR)
- D TASKBULL^XMXBULL(XMDUZ,XMBN,.XMPARM,.XMBODY,.XMTO,.XMINSTR,.XMTASK,.XMATTACH)
- Q
- TERMMSG(XMDUZ,XMK,XMKZA,XMMSG) ; Terminate msgs
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
- D ACTMSGS^XMXPARM(.XMDUZ,.XMK,.XMKZA) Q:$D(XMERR)
- D TERMMSG^XMXMSGS(XMDUZ,.XMK,.XMKZA,.XMMSG)
- Q
- VAPORMSG(XMDUZ,XMK,XMKZA,XMINSTR,XMMSG) ; Set vaporize date for msgs in a basket
- ; XMINSTR("VAPOR")
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
- D VAPORMSG^XMXPARM(.XMDUZ,.XMK,.XMKZA,.XMINSTR) Q:$D(XMERR)
- D VAPORMSG^XMXMSGS(XMDUZ,.XMK,.XMKZA,.XMINSTR,.XMMSG)
- Q
- ZAPSERV(XMKN,XMZ) ; Delete a message from a server basket
- ; XMKN full server name, including "S."
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- D SERV^XMXPARMB(.XMKN,.XMZ) Q:$D(XMERR)
- D ZAPSERV^XMXMSGS1(XMKN,XMZ)
- Q
- ; ***** other actions
- ADDRNSND(XMDUZ,XMZ,XMTO,XMINSTR) ; Build a message part 2 (address and send)
- ; XMZ (in)
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
- D ADDRNSND^XMXPARM(.XMDUZ,.XMZ,.XMTO,.XMINSTR) Q:$D(XMERR)
- D ADDRNSND^XMXSEND(XMDUZ,XMZ,.XMTO,.XMINSTR)
- Q
- CRE8XMZ(XMSUBJ,XMZ) ; Build a message part 1 (create)
- ; In: subject
- ; Out: XMZ
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- D VSUBJ^XMXPARM(.XMSUBJ) Q:$D(XMERR)
- D CRE8XMZ^XMXSEND(XMSUBJ,.XMZ)
- Q
- MOVEBODY(XMZ,XMBODY) ; Move text to the message
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- D MOVEBODY^XMXPARM(.XMZ,.XMBODY) Q:$D(XMERR)
- D MOVEBODY^XMXSEND(XMZ,XMBODY)
- Q
- TOWHOM(XMDUZ,XMZ,XMTYPE,XMTO,XMINSTR,XMFULL) ; Check ONE msg addressee
- ; XMFULL Expanded address of the addressee
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
- D TOWHOM^XMXPARM(.XMDUZ,.XMZ,.XMTYPE,XMTO,.XMINSTR) Q:$D(XMERR)
- D TOWHOM^XMXTO(XMDUZ,.XMZ,XMTYPE,XMTO,.XMINSTR,.XMFULL)
- Q
- VSUBJ(XMSUBJ) ; Validate a subject
- N DIERR ; ADDED IN PATCH XM*8.0*41 JDG
- D VSUBJ^XMXPARM(.XMSUBJ)
- Q
- XMXAPI ;ISC-SF/GMB-Message APIs ; 4/2/09 10:11am
- +1 ;;8.0;MailMan;**15,41**;Jun 28, 2002;Build 4
- +2 ; All entry points covered by DBIA 2729.
- +3 ; Variables input:
- +4 ; XMATTACH Imaging system BLOB attachment array
- +5 ; XMBODY Message text (MUST NOT BE "XMBODY")
- +6 ; (must be closed root, passed by value. See WP_ROOT
- +7 ; definition for WP^DIE(), FM word processing filer)
- +8 ; XMDUZ User's DUZ, or enough of user's name for a positive ID
+9 ; eg: 1301 or "lastname,firs"
+10 ; XMK Basket number, or enough of a name for a positive ID
+11 ; eg: 1 or "IN"
+12 ; XMKZ Message number in basket XMK
+13 ; OR
+14 ; if $G(XMK)="", Message number in ^XMB(3.9
+15 ; XMKZA Message number list or list array in basket XMK
+16 ; eg: "1,3,5-7" or ARRAY("1,3")=""
+17 ; ARRAY("5-7")=""
+18 ; (list may end in comma)
+19 ; (ARRAY must be passed by reference)
+20 ; OR
+21 ; if $G(XMK)="", Message number list or list array in ^XMB(3.9
+22 ; (same rules, but number ranges are NOT allowed)
+23 ; XMSUBJ Message subject
+24 ; XMTO Addressee or addressee array
+25 ; (array must be passed by reference)
+26 ; User's DUZ, or enough of user's name for a positive ID
+27 ; eg: 1301 or "lastname,firs" or ARRAY(1301)=""
+28 ; ARRAY("lastname,firs")=""
+29 ; G.group name (enough for positive ID)
+30 ; S.server name (enough for positive ID)
+31 ; D.device name (enough for positive ID)
+32 ; prefix above (except devices and servers) by:
+33 ; I: for 'information only' recipient (may not reply)
+34 ; eg: "I:1301" or "I:lastname,firs"
+35 ; C: for 'copy' recipient (not expected to reply)
+36 ; eg: "C:1301" or "C:lastname,firs"
+37 ; L@datetime: for when (in future) to send to this recipient
+38 ; (datetime may be anything accepted by FM)
+39 ; eg: "L@25 DEC@0500:1301" or "L@1 JAN:lastname,firs"
+40 ; or "L@2981225.05:1301"
+41 ; (may combine IL@datetime: or CL@datetime:)
+42 ; To delete recipient, prefix by -
+43 ; eg: -1301 or "-lastname,firs"
+44 ; XMZ message number in ^XMB(3.9,
+45 ;
+46 ; Variables output (must be passed by reference):
+47 ; XMFULL expanded address of last addressee
+48 ; XMMSG simple message telling how many messages were acted on
+49 ; XMZ message number created in ^XMB(3.9,
+50 ;
+51 ; Errors
+52 ; XMERR if there's any errors, then XMERR is set to the number of
+53 ; errors, otherwise XMERR is undefined.
+54 ; ^TMP("XMERR",$J,error number,"TEXT",line number)=error text
ANSRMSG(XMDUZ,XMK,XMKZ,XMSUBJ,XMBODY,XMTO,XMINSTR,XMZR) ; Answer a msg (Send new msg with copy of original msg inside)
+1 ; In: User, basket, msg #
+2 ; Out: XMZR (message number of answer)
+3 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+4 IF '$DATA(XMV)
NEW XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
+5 DO ANSRMSG^XMXPARM(.XMDUZ,.XMK,.XMKZ,.XMSUBJ,.XMBODY,.XMTO,.XMINSTR)
IF $DATA(XMERR)
QUIT
+6 DO ANSRMSG^XMXANSER(XMDUZ,.XMK,XMKZ,.XMSUBJ,XMBODY,.XMTO,.XMINSTR,.XMZR)
+7 QUIT
DELMSG(XMDUZ,XMK,XMKZA,XMMSG) ; Delete msgs from a basket
+1 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+2 IF '$DATA(XMV)
NEW XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
+3 DO ACTMSGS^XMXPARM(.XMDUZ,.XMK,.XMKZA)
IF $DATA(XMERR)
QUIT
+4 DO DELMSG^XMXMSGS(XMDUZ,.XMK,.XMKZA,.XMMSG)
+5 QUIT
FLTRMSG(XMDUZ,XMK,XMKZA,XMMSG) ; Filters msgs in a basket
+1 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+2 IF '$DATA(XMV)
NEW XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
+3 DO ACTMSGS^XMXPARM(.XMDUZ,.XMK,.XMKZA)
IF $DATA(XMERR)
QUIT
+4 DO FLTRMSG^XMXMSGS(XMDUZ,.XMK,.XMKZA,.XMMSG)
+5 QUIT
FWDMSG(XMDUZ,XMK,XMKZA,XMTO,XMINSTR,XMMSG) ; Forward msgs
+1 ; XMINSTR("SHARE DATE")
+2 ; XMINSTR("SHARE BSKT")
+3 ; XMINSTR("SELF BSKT")
+4 ; XMINSTR("FWD BY") substitute any string instead of XMDUZ name
+5 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+6 IF '$DATA(XMV)
NEW XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
+7 DO FWDMSG^XMXPARM(.XMDUZ,.XMK,.XMKZA,.XMTO,.XMINSTR)
IF $DATA(XMERR)
QUIT
+8 DO FWDMSG^XMXMSGS(XMDUZ,.XMK,.XMKZA,.XMTO,.XMINSTR,.XMMSG)
+9 QUIT
LATERMSG(XMDUZ,XMK,XMKZA,XMINSTR,XMMSG) ; Later msgs
+1 ; XMINSTR("LATER")
+2 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+3 IF '$DATA(XMV)
NEW XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
+4 DO LATERMSG^XMXPARM(.XMDUZ,.XMK,.XMKZA,.XMINSTR)
IF $DATA(XMERR)
QUIT
+5 DO LATERMSG^XMXMSGS(XMDUZ,.XMK,.XMKZA,.XMINSTR,.XMMSG)
+6 QUIT
MOVEMSG(XMDUZ,XMK,XMKZA,XMKTO,XMMSG) ; Move msgs from one basket to another
+1 ; XMKTO Basket number, or enough of a name for a positive ID.
+2 ; Identifies basket to move to
+3 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+4 IF '$DATA(XMV)
NEW XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
+5 DO MOVEMSG^XMXPARM(.XMDUZ,.XMK,.XMKZA,.XMKTO)
IF $DATA(XMERR)
QUIT
+6 DO MOVEMSG^XMXMSGS(XMDUZ,.XMK,.XMKZA,XMKTO,.XMMSG)
+7 QUIT
NTOGLMSG(XMDUZ,XMK,XMKZA,XMMSG) ; New Toggle msgs
+1 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+2 IF '$DATA(XMV)
NEW XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
+3 DO ACTMSGS^XMXPARM(.XMDUZ,.XMK,.XMKZA)
IF $DATA(XMERR)
QUIT
+4 DO NTOGLMSG^XMXMSGS(XMDUZ,.XMK,.XMKZA,.XMMSG)
+5 QUIT
PRTMSG(XMDUZ,XMK,XMKZA,XMPRTTO,XMINSTR,XMMSG,XMTASK,XMSUBJ,XMTO) ; Print msgs
+1 ; XMINSTR("HDR"), "RESPS", "RECIPS", "WHEN"
+2 ; XMPRTTO Printer name
+3 ; XMSUBJ & XMTO used only if XMPRTTO is a P-MESSAGE device. Even then, they're optional.
+4 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+5 IF '$DATA(XMV)
NEW XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
+6 DO PRTMSG^XMXPARM(.XMDUZ,.XMK,.XMKZA,.XMPRTTO,.XMINSTR,.XMSUBJ,.XMTO)
IF $DATA(XMERR)
QUIT
+7 DO PRTMSG^XMXMSGS(XMDUZ,.XMK,.XMKZA,XMPRTTO,.XMINSTR,.XMMSG,.XMTASK,.XMSUBJ,.XMTO)
+8 QUIT
PUTSERV(XMKN,XMZ) ; Put a message in a server basket
+1 ; XMKN full server name, including "S."
+2 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+3 DO SERV^XMXPARMB(.XMKN,.XMZ)
IF $DATA(XMERR)
QUIT
+4 DO PUTSERV^XMXMSGS1(XMKN,XMZ)
+5 QUIT
REPLYMSG(XMDUZ,XMK,XMKZ,XMBODY,XMINSTR,XMZR) ; Reply to msg (Attach reply to original msg)
+1 ; XMINSTR("NET REPLY") 1=send over the network; 0=don't (default)
+2 ; XMINSTR("NET SUBJ") Network Reply subject (see XMSUBJ)
+3 ; Out: XMZR (message number of answer)
+4 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+5 IF '$DATA(XMV)
NEW XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
+6 DO REPLYMSG^XMXPARM(.XMDUZ,.XMK,.XMKZ,.XMBODY,.XMINSTR)
IF $DATA(XMERR)
QUIT
+7 DO REPLYMSG^XMXREPLY(XMDUZ,.XMK,XMKZ,XMBODY,.XMINSTR,.XMZR)
+8 QUIT
SENDBULL(XMDUZ,XMBN,XMPARM,XMBODY,XMTO,XMINSTR,XMZ,XMATTACH) ; Send a bulletin (returns XMZ)
+1 ; In: User, bulletin name, bulletin parameters, add'l text,
+2 ; add'l recipients, send now or later (when?), opt'l BLOB
+3 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+4 IF '$DATA(XMV)
NEW XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
+5 DO BULLETIN^XMXPARM(.XMDUZ,.XMBN,.XMPARM,.XMBODY,.XMTO,.XMINSTR,.XMATTACH)
IF $DATA(XMERR)
QUIT
+6 DO SENDBULL^XMXBULL(XMDUZ,XMBN,.XMPARM,.XMBODY,.XMTO,.XMINSTR,.XMZ,.XMATTACH)
+7 QUIT
SENDMSG(XMDUZ,XMSUBJ,XMBODY,XMTO,XMINSTR,XMZ,XMATTACH) ; Send a msg
+1 ; In: User, basket (if you are recipient), all msg parts,
+2 ; priority?, closed?, (info?,cc?), send now or later (when?),
+3 ; (KIDS,MIME,text,PackMan), delete date (if to shared,mail)
+4 ; XMINSTR("RCPT BSKT")
+5 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+6 IF '$DATA(XMV)
NEW XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
+7 DO SENDMSG^XMXPARM(.XMDUZ,.XMSUBJ,.XMBODY,.XMTO,.XMINSTR,.XMATTACH)
IF $DATA(XMERR)
QUIT
+8 DO SENDMSG^XMXSEND(XMDUZ,XMSUBJ,XMBODY,.XMTO,.XMINSTR,.XMZ,.XMATTACH)
+9 QUIT
TASKBULL(XMDUZ,XMBN,XMPARM,XMBODY,XMTO,XMINSTR,XMTASK,XMATTACH) ; Send a bulletin (Task it - does not return XMZ)
+1 ; XMBN Bulletin name (must be full name)
+2 ; XMPARM Array of parameters necessary for bulletin
+3 ; ARRAY(1)="parameter 1"
+4 ; ARRAY(2)="parameter 2"
+5 ; XMBODY Additional text to append to the bulletin text
+6 ; (must be closed root, passed by value. See WP_ROOT
+7 ; definition for WP^DIE(), FM word processing filer)
+8 ; XMTO Additional addressee(s)
+9 ; XMINSTR("SELF BSKT")
+10 ; ***ETC.***
+11 ; In: User, bulletin name, bulletin parameters, add'l text,
+12 ; add'l recipients, send now or later (when?), opt'l BLOB
+13 ; Out: XMTASK (task number)
+14 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+15 IF '$DATA(XMV)
NEW XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
+16 DO BULLETIN^XMXPARM(.XMDUZ,.XMBN,.XMPARM,.XMBODY,.XMTO,.XMINSTR,.XMATTACH)
IF $DATA(XMERR)
QUIT
+17 DO TASKBULL^XMXBULL(XMDUZ,XMBN,.XMPARM,.XMBODY,.XMTO,.XMINSTR,.XMTASK,.XMATTACH)
+18 QUIT
TERMMSG(XMDUZ,XMK,XMKZA,XMMSG) ; Terminate msgs
+1 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+2 IF '$DATA(XMV)
NEW XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
+3 DO ACTMSGS^XMXPARM(.XMDUZ,.XMK,.XMKZA)
IF $DATA(XMERR)
QUIT
+4 DO TERMMSG^XMXMSGS(XMDUZ,.XMK,.XMKZA,.XMMSG)
+5 QUIT
VAPORMSG(XMDUZ,XMK,XMKZA,XMINSTR,XMMSG) ; Set vaporize date for msgs in a basket
+1 ; XMINSTR("VAPOR")
+2 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+3 IF '$DATA(XMV)
NEW XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
+4 DO VAPORMSG^XMXPARM(.XMDUZ,.XMK,.XMKZA,.XMINSTR)
IF $DATA(XMERR)
QUIT
+5 DO VAPORMSG^XMXMSGS(XMDUZ,.XMK,.XMKZA,.XMINSTR,.XMMSG)
+6 QUIT
ZAPSERV(XMKN,XMZ) ; Delete a message from a server basket
+1 ; XMKN full server name, including "S."
+2 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+3 DO SERV^XMXPARMB(.XMKN,.XMZ)
IF $DATA(XMERR)
QUIT
+4 DO ZAPSERV^XMXMSGS1(XMKN,XMZ)
+5 QUIT
+6 ; ***** other actions
ADDRNSND(XMDUZ,XMZ,XMTO,XMINSTR) ; Build a message part 2 (address and send)
+1 ; XMZ (in)
+2 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+3 IF '$DATA(XMV)
NEW XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
+4 DO ADDRNSND^XMXPARM(.XMDUZ,.XMZ,.XMTO,.XMINSTR)
IF $DATA(XMERR)
QUIT
+5 DO ADDRNSND^XMXSEND(XMDUZ,XMZ,.XMTO,.XMINSTR)
+6 QUIT
CRE8XMZ(XMSUBJ,XMZ) ; Build a message part 1 (create)
+1 ; In: subject
+2 ; Out: XMZ
+3 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+4 DO VSUBJ^XMXPARM(.XMSUBJ)
IF $DATA(XMERR)
QUIT
+5 DO CRE8XMZ^XMXSEND(XMSUBJ,.XMZ)
+6 QUIT
MOVEBODY(XMZ,XMBODY) ; Move text to the message
+1 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+2 DO MOVEBODY^XMXPARM(.XMZ,.XMBODY)
IF $DATA(XMERR)
QUIT
+3 DO MOVEBODY^XMXSEND(XMZ,XMBODY)
+4 QUIT
TOWHOM(XMDUZ,XMZ,XMTYPE,XMTO,XMINSTR,XMFULL) ; Check ONE msg addressee
+1 ; XMFULL Expanded address of the addressee
+2 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+3 IF '$DATA(XMV)
NEW XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
+4 DO TOWHOM^XMXPARM(.XMDUZ,.XMZ,.XMTYPE,XMTO,.XMINSTR)
IF $DATA(XMERR)
QUIT
+5 DO TOWHOM^XMXTO(XMDUZ,.XMZ,XMTYPE,XMTO,.XMINSTR,.XMFULL)
+6 QUIT
VSUBJ(XMSUBJ) ; Validate a subject
+1 ; ADDED IN PATCH XM*8.0*41 JDG
NEW DIERR
+2 DO VSUBJ^XMXPARM(.XMSUBJ)
+3 QUIT