source: FOIAVistA/tag/r/MAILMAN-XM/XMRENT.m@ 1226

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

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1XMRENT ;ISC-SF/GMB-Msg Network Header Info API ;04/19/2002 13:17
2 ;;8.0;MailMan;;Jun 28, 2002
3 ; Was (WASH ISC)/CMW
4 ;
5 ; Entry points (DBIA 1143):
6 ; $$NET Get message information.
7 ;
8 ;Extrinsic Function for API call to parse network header
9 ;Parameter #1=Message #
10 ;
11 ;Output=STRING
12 ; Message-date ^ Encryption-code ^ Returned addr of sender ^ Message ID
13 ; ^ Sender ^ Message subject ^ Message ID of In-reply-to ^ Message Type
14 ;
15NET(XMZ) ;
16 Q:'$D(^XMB(3.9,XMZ,0)) ""
17 N XMDATE,XMENCR,XMFROM,XMREMID,XMSEND,XMSUBJ,XMZO,XMFIRST
18 S XMFIRST=$O(^XMB(3.9,XMZ,2,0))
19 I XMFIRST,XMFIRST<1 D
20 . D NETMAIL(XMZ,.XMREMID,.XMSUBJ,.XMFROM,.XMDATE,.XMSEND,.XMENCR,.XMZO)
21 E D
22 . D LOCMAIL(XMZ,.XMREMID,.XMSUBJ,.XMFROM,.XMDATE,.XMSEND,.XMENCR,.XMZO)
23 Q $G(XMDATE)_U_$G(XMENCR)_U_$G(XMFROM)_U_$G(XMREMID)_U_$G(XMSEND)_U_$G(XMSUBJ)_U_$G(XMZO)_U_$P($G(^XMB(3.9,XMZ,0)),U,7)
24LOCMAIL(XMZ,XMREMID,XMSUBJ,XMFROM,XMDATE,XMSEND,XMENCR,XMZO) ; Get data for Locally originated message
25 N XMZREC,Y
26 S XMZREC=^XMB(3.9,XMZ,0)
27 S Y=$P(XMZREC,U,3),%DT="S" D DD^%DT S XMDATE=Y
28 S:$P(XMZREC,U,8) XMZO=^XMB("NETNAME")_"@"_$P(XMZREC,U,8)
29 S XMSEND=$S($P(XMZREC,U,4)="":"",1:$$NAME^XMXUTIL($P(XMZREC,U,4)))
30 S XMENCR=$P(XMZREC,U,10)
31 S XMFROM=$$NAME^XMXUTIL($P(XMZREC,U,2))
32 S XMSUBJ=$$SUBJ^XMXUTIL2(XMZREC)
33 S XMREMID=$$NETID^XMS3(XMZ)
34 Q
35NETMAIL(XMZ,XMREMID,XMSUBJ,XMFROM,XMDATE,XMSEND,XMENCR,XMZO) ; Get data for Message that originated from another domain
36 D PARSE^XMR3(XMZ,.XMREMID,.XMSUBJ,.XMFROM,.XMDATE,.XMSEND,.XMENCR,.XMZO)
37 S:$G(XMSUBJ)="" XMSUBJ=" "
38 S XMFROM="<"_$$REMADDR^XMXADDR3(XMFROM)_">"
39 S:XMREMID[".VA.GOV" XMFROM=$TR($P(XMFROM,"@"),"._+",", .")_"@"_$P(XMFROM,"@",2)
40 Q
Note: See TracBrowser for help on using the repository browser.