34 lines
1.2 KiB
Mathematica
34 lines
1.2 KiB
Mathematica
XMDIRSND ;(WASH ISC)/CMW- Send Email Directory ;04/18/2002 07:31
|
|
;;8.0;MailMan;;Jun 28, 2002
|
|
; Entry points used by MailMan options (not covered by DBIA):
|
|
; SEND XMMGR-DIRECTORY-SEND
|
|
SEND ;
|
|
I $P($G(^XMB(1,1,8.4)),U) D
|
|
. D OK(XQSND)
|
|
E D NOTOK(XQSND)
|
|
D ZAPSERV^XMXMSGS1("S."_XQSOP,XQMSG)
|
|
Q
|
|
NOTOK(XMTO) ;
|
|
N XMTEXT,XMINSTR
|
|
S XMINSTR("FROM")=.5
|
|
S XMTO=$$REMADDR^XMXADDR3(XMTO)
|
|
S XMTEXT(1)="User directory request at Domain "_^XMB("NETNAME")
|
|
S XMTEXT(2)="is not granted."
|
|
D SENDMSG^XMXSEND(.5,"Directory Request","XMTEXT",XMTO,.XMINSTR)
|
|
Q
|
|
OK(XMFROM) ;
|
|
N XMZ,XMUSER,XMREC,XMNAME,XMINSTR,XMTO,XMNETNAM
|
|
S XMINSTR("FROM")=.5,XMNETNAM=^XMB("NETNAME")
|
|
S XMTO=$P($$REMADDR^XMXADDR3(XMFROM),"@",2)
|
|
S XMTO="S.XMMGR-DIRECTORY-RECV"_$S(XMTO="":"",1:"@"_XMTO)
|
|
D STARTMSG^XMXSEND("Collect network user address",.XMZ)
|
|
S XMUSER=0
|
|
F S XMUSER=$O(^XMB(3.7,XMUSER)) Q:XMUSER'>0 D
|
|
. S XMREC=$G(^VA(200,XMUSER,0)) Q:'$L($P(XMREC,U,3))
|
|
. S XMNAME("FILE")=200,XMNAME("IENS")=XMUSER_",",XMNAME("FIELD")=.01
|
|
. S XMNAME=$$HLNAME^XLFNAME(.XMNAME)
|
|
. ;Lname^Fname^Room#^MailCode^MailCode+^Location^Netname^Phone#^Phone_Ext
|
|
. D BODYLINE^XMXSEND(XMZ,$P(XMNAME,U,1,2)_"^^^^^"_$TR($$NAME^XMXUTIL(XMUSER),". ,","+_.")_"@"_XMNETNAM)
|
|
D ENDMSG^XMXSEND(.5,XMZ,XMTO,.XMINSTR)
|
|
Q
|