source: FOIAVistA/trunk/r/MAILMAN-XM/XMS2.m

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

initial load of FOIAVistA 6/30/08 version

File size: 3.4 KB
Line 
1XMS2 ;ISC-SF/GMB-SMTP Send (non-standard) ;04/25/2002 14:14
2 ;;8.0;MailMan;;Jun 28, 2002
3NONSTD(XMNETNAM,XMZ,XMZREC,XMRZ,XMRSET) ; Non-Standard commands,
4 ; used only when communicating with other MailMan sites.
5 I $O(^XMB(3.9,XMZ,2005,0)),XMC("MAILMAN")>7 D Q:ER
6 . N XMBLOBER ; Send other Body parts
7 . S XMBLOBER=0
8 . D ^XMS0BLOB
9 . I XMBLOBER S ER=1,ER("NONFATAL")=1
10 D MESSID(XMNETNAM,XMZ,.XMRZ,.XMRSET) Q:ER!$G(XMRSET)
11 I XMC("MAILMAN")<8 D Q:ER
12 . D SPECIAL(XMZREC) Q:ER
13 E D Q:ER
14 . D LINES Q:ER!$G(XMRSET)
15 Q
16MESSID(XMNETNAM,XMZ,XMRZ,XMRSET) ;
17 ; This is a head's up on which message is being sent, and allows the
18 ; receiving site to say, "don't bother, I've already received it long
19 ; ago and it's already been purged." or "I've already got it, so don't
20 ; bother sending the text again, but maybe you've got some new
21 ; recipients for me."
22 ; Send: "MESS ID:654321@LOCAL.MED.VA.GOV"
23 ; Recv: "250 OK"
24 ; or: "RSET :21212@REMOTE.MED.VA.GOV:Duplicate purged"
25 ; or: "RSET :21212@REMOTE.MED.VA.GOV:Previously received"
26 N XMREMID
27 S XMREMID=$$NETID^XMS3(XMZ)
28 I XMREMID="" D Q
29 . ; *** Maybe the thing to do here is to just assign it a net id
30 . ; *** and go on our merry way.
31 . D ERTRAN^XMC1(42357) ;Msg transmit aborted - remote msg with no remote msg ID
32 . S ER("NONFATAL")=1
33 . D DOTRAN^XMC1("")
34 . N XMPARM,XMINSTR
35 . S XMINSTR("FROM")="POSTMASTER"
36 . S XMPARM(1)=XMZ
37 . D TASKBULL^XMXBULL(.5,"XM SEND ERR REMOTE MSG ID",.XMPARM,"",.5,.XMINSTR)
38 S XMSG="MESS ID:"_XMREMID X XMSEN Q:ER
39 X XMREC Q:ER
40 I $E(XMRG,1,4)="RSET" S XMRSET=1,XMRZ=$P(XMRG,":",2) Q
41 Q
42LINES ; If message is at least 1000 lines, and it's not a PackMan message,
43 ; let the other site know. If the other site says it's too many lines,
44 ; we don't have to bother with the text.
45 N XMLINES
46 S XMLINES=$$LINE^XMXUTIL2(XMZ) Q:XMLINES<1000
47 Q:$$PAKMAN^XMXSEC1(XMZ)
48 S XMSG="MESS LINES:"_XMLINES X XMSEN Q:ER
49 X XMREC Q:ER
50 I $E(XMRG,1,4)="RSET" S XMRSET=1 Q
51 Q
52SPECIAL(XMZREC) ; Special message characteristics
53 ;I 'XMC("MAILMAN") D CHEKSPEC(XMINST,XMSITE,XMZ,XMZREC,XMNVFROM) Q
54 N I
55 S I=7 I $P(XMZREC,U,I)'="" D SPECSEND(I,$P(XMZREC,U,I)) Q:ER
56 Q:ER
57 F I=5,9,11,12 I "^Y^y^"[(U_$P(XMZREC,U,I)_U) D SPECSEND(I,$P(XMZREC,U,I)) Q:ER
58 Q:ER
59 Q
60SPECSEND(I,XMVAL) ;
61 S XMSG="MESS "_$P("^^^^CONFIRMATION^^TYPE^^CLOSED^^CONFIDENTIAL^INFO",U,I)_":"_XMVAL X XMSEN Q:ER
62 X XMREC
63 Q
64 ; *** The following is not used ***
65CHEKSPEC(XMINST,XMSITE,XMZ,XMZREC,XMNVFROM) ; If special VA-only instructions exist, send msg to user
66 N I,XMSPEC
67 F I=6,7 I $P(XMZREC,U,I)'="" D SPECSET(I,.XMSPEC)
68 F I=5,9,11,12 I "^Y^y^"[(U_$P(XMZREC,U,I)_U) D SPECSET(I,.XMSPEC)
69 Q:'$D(XMSPEC)
70 N XMTEXT,J,XMINSTR,XMTO,XMIEN
71 S XMINSTR("FROM")="POSTMASTER"
72 S I=0
73 S I=I+1,XMTEXT(I)="Your message to "_XMSITE_","
74 S I=I+1,XMTEXT(I)="Subject: "_$P(XMZREC,U,1)_" ["_XMZ_"]"
75 S I=I+1,XMTEXT(I)="will not include any special instructions, since that site"
76 S I=I+1,XMTEXT(I)="is running a very old MailMan version: "_XMC("MAILMAN")
77 S I=I+1,XMTEXT(I)=""
78 S I=I+1,XMTEXT(I)="The special instructions to be ignored are:"
79 S I=I+1,XMTEXT(I)=""
80 S J=""
81 F S J=$O(XMSPEC(J)) Q:J="" S I=I+1,XMTEXT(I)=" "_J
82 S XMIEN=""
83 F S XMIEN=$O(^XMB(3.9,XMZ,1,"AQUEUE",XMINST,XMIEN)) Q:XMIEN="" S XMTO($$SENDER^XMS3(XMZ,XMZREC,XMNVFROM,XMIEN))=""
84 D SENDMSG^XMXSEND(.5,"Special Instructions Ignored","XMTEXT",.XMTO,.XMINSTR)
85 Q
86SPECSET(I,XMSPEC) ;
87 S XMSPEC($P("^^^^CONFIRMATION request^VAPORIZE date^TYPE^^CLOSED status^^CONFIDENTIAL status^INFO status",U,I))=""
88 Q
Note: See TracBrowser for help on using the repository browser.