source: WorldVistAEHR/trunk/r/MAILMAN-XM/XMXMBOX.m@ 862

Last change on this file since 862 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.0 KB
RevLine 
[613]1XMXMBOX ;ISC-SF/GMB-Mailbox APIs ;04/17/2002 14:10
2 ;;8.0;MailMan;;Jun 28, 2002
3QMBOX(XMDUZ,XMMSG) ; Message counts for a mailbox
4 K XMERR,^TMP("XMERR",$J)
5 S XMMSG=""
6 I XMDUZ'=DUZ,'$$RPRIV^XMXSEC Q
7 S XMMSG=$$NEWS^XMXUTIL(XMDUZ)
8 Q
9FLTRMBOX(XMDUZ,XMMSG) ; Filter all the messages in a user's mailbox.
10 K XMERR,^TMP("XMERR",$J)
11 S XMMSG=""
12 I XMDUZ'=DUZ,'$$RPRIV^XMXSEC Q
13 N XMK
14 S XMK=.99
15 F S XMK=$O(^XMB(3.7,XMDUZ,2,XMK)) Q:XMK'>0!(XMDUZ=.5&(XMK>999)) D
16 . D FLTRBSKT^XMXBSKT(XMDUZ,XMK)
17 S XMMSG=$$EZBLD^DIALOG(34306.3) ; Mailbox filtered.
18 Q
19CRE8MBOX(XMDUZ,XMDATE) ; Create a Mailbox for a user
20 ; XMDUZ The user's DUZ
21 ; XMDATE The user has been reinstated after not having worked here a
22 ; while. Please note the earliest message date which the user
23 ; may access, and don't let the user access any messages before
24 ; that date, except for any which someone might forward to the
25 ; user.
26 ; =fileman date or any supported date format that FileMan
27 ; recognizes (The date must be exact.)
28 ; The user may not access any before this date.
29 ; =0 - (default) The user may access any old msgs which had
30 ; been addressed to the user.
31 K XMERR,^TMP("XMERR",$J)
32 ;I DUZ'=.5,'$$POSTPRIV^XMXSEC Q
33 I '$D(^XMB(3.7,XMDUZ,0)) D
34 . N XMFDA,XMIEN,XMTRIES
35 . S XMFDA(3.7,"+1,",.01)=XMDUZ
36 . S XMIEN(1)=XMDUZ
37CTRY . D UPDATE^DIE("S","XMFDA","XMIEN") Q:'$D(DIERR)
38 . S XMTRIES=$G(XMTRIES)+1
39 . I $D(^TMP("DIERR",$J,"E",110)) H 1 G CTRY ; Try again if can't lock
40 D:'$D(^XMB(3.7,XMDUZ,2,.5,0)) MAKEBSKT^XMXBSKT(XMDUZ,.5,$$EZBLD^DIALOG(37004)) ; WASTE
41 D:'$D(^XMB(3.7,XMDUZ,2,1,0)) MAKEBSKT^XMXBSKT(XMDUZ,1,$$EZBLD^DIALOG(37005)) ; IN
42 ; Limit message access at reinstatement?
43 Q:$G(XMDATE)=""!($G(XMDATE)=0)
44 N XMFDA
45 S XMFDA(3.7,XMDUZ_",",1.2)=XMDATE
46 D FILE^DIE("E","XMFDA")
47 Q
48TERMMBOX(XMDUZ) ; Terminate a user's Mailbox
49 ; (Delete all traces of a user in MailMan)
50 ; XMDUZ The user's DUZ
51 K XMERR,^TMP("XMERR",$J)
52 I DUZ'=.5,'$$POSTPRIV^XMXSEC Q
53 D TERMINAT^XMUTERM1(XMDUZ)
54 Q
Note: See TracBrowser for help on using the repository browser.