Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XMAH1CP

XMAH1CP.m

Go to the documentation of this file.
  1. XMAH1 ;(WASH ISC)/CAP- Network Responses ;3/25/91 20:13 ; [ 02/22/96 9:27 AM ]
  1. ;;7.1;Mailman;**1003**;OCT 27, 1998
  1. ;;7.1;MailMan;**4**;Jun 02, 1994
  1. ENTA G AQ:XMK>.999,AQ:"Yy"[$E($P(XMR,U,12)_" ")
  1. S Y=$O(^XMB(3.9,XMZ,1,"C",XMDUZ,0))
  1. I Y,$D(^XMB(3.9,XMZ,1,Y,"T")) G AZ:^("T")="I"
  1. W *7,!!," << Message SAVED in IN Basket ! >>",!
  1. S (XMK,XMKM)=1,XMKN="IN",XMKD=.5 D NEW^XMA,KL^XMA1B,S2^XMA1B K XMKD,XMKM S XMKS=""
  1. AQ ;Is it a network response ? (current code just checks sender)
  1. ;IHS/MFD added ,IHSREC and ,IHSREC=1 below
  1. ;IHSREC -the sender is from another domain, also used for other domain
  1. ; recipients under IHS1 subroutine
  1. ;IHS -one or more recipients are of another domain
  1. ;IHSNET -the send across network question has already been asked
  1. ;FORUM is screened when sender is from there
  1. ;R mfd ;for testing
  1. K XMNETREC,IHSREC I XMDUZ'=.6,$S($P(XMR,U,2)["@":1,1:0),$S($P(XMR,U,2)["DOMAIN.NAME":0,1:1) S XMNETREC=1,IHSREC=1
  1. K IHS,IHSNET D IHS ;IHS/MFD added line
  1. D REPLY^XMA11 K XMSUB I X[U K XMNETREC G AZ
  1. W !!," << LOCAL Reply Sent >>",!
  1. AQ1 ;I $S('$D(XMNETREC):0,XMNETREC:1,1:0) K XMCHAN D AR ;IHS/MFD comm out
  1. I $S('$D(IHSREC):0,IHSREC:1,1:0) K XMCHAN K IHSREC D AR ;IHS/MFD added line
  1. I $D(IHS) D IHS1 K IHSX,IHS,IHSNET,IHSREC ;IHS/MFD added line
  1. AZ G C1^XMA1
  1. AR K XMY,XMY0,^TMP("XMY",$J),^TMP("XMY0",$J)
  1. ;
  1. G ARN:$D(IHSNET)
  1. G ARN:$D(XMCHAN) D ZIS
  1. ARA W *7,$S($D(IORVON):IORVON,1:""),!,"Do you wish to send this reply across the network ? YES//",$S($D(IORVOFF):IORVOFF,1:"") R X:DTIME ;IHS/MFD changed NO to YES for default
  1. S IHSNET=""
  1. G ARS:X["^" S X=$TR(X,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
  1. ;G ARS:$E("NO",1,$L(X))=X,ARN:$E("YES",1,$L(X))=X
  1. G ARN:$E("YES",1,$L(X))=X,ARS:$E("NO",1,$L(X))=X ;IHS/MFD added line
  1. W !!,$C(7)_"Enter 'Yes' if you wish to send this message across the network."
  1. W !,"Enter 'No' if you wish your response to remain local."
  1. W !,"The sender of this message will not see your response if you answer 'No'."
  1. W !!,"CAUTION !!!",!!
  1. W "A network response will go to all message recipients on the mail system"
  1. W !,"of the sender. FOR EXAMPLE, If the sender's address ends '@DOMAIN.NAME'"
  1. W !,"and the message had 500 recipients on FORUM, then a response sent across"
  1. W !,"the network will be delivered to 500 recipients. If you prefer to send a"
  1. W !,"response only to the sender, you should create a new message.",!!
  1. G ARA
  1. ARN S XMNETREC(0)=XMZ,XMSUB="Reply to: "_$E($P(XMR,U),1,50)
  1. S XMNETREC("XMR")=XMR,XMR=^XMB(3.9,XMNETREC,0),$P(XMR,U,8)=XMZ,XMZ=XMNETREC I $D(XMCHAN)!($D(IHS)) S $P(XMR,U)=XMSUB,^(0)=XMR
  1. I '$D(XMCHAN),'$D(IHSNET) S X=0 D ENTS^XMA20 W ! ;IHS/MFD comm out ask of subject
  1. I $S(X=U:1,'$D(^XMB(3.9,XMZ,0)):1,1:0) G ARS
  1. S X=XMSUB ;IHS/MFD added line
  1. S Y=$P(^XMB(3.9,XMZ,0),U) I $L(Y) K ^XMB(3.9,"B",$E(Y,1,30),XMZ)
  1. S ^XMB(3.9,"B",$E(X,1,30),XMZ)="",$P(XMR,U,1,2)=X_U_$S($D(XMDUZ):XMDUZ,1:DUZ),^XMB(3.9,XMZ,0)=XMR,XMN=0
  1. ;
  1. ;Send Network Response to Sender's home system
  1. S (Y1,X)=$P($$NET^XMRENT(XMNETREC(0)),U,3) I $G(X)="" S (Y1,X)=$P(^XMB(3.9,XMNETREC(0),0),U,2)
  1. I $D(IHSREC) S (Y1,X)=IHSREC K IHSREC
  1. I X["@" D ACHK I Y<0,'$D(XMCHAN) W !,"Reply NOT sent to sender.",*7 S Y=$S($P(X,"@")["POSTMASTER":"No responses allowed to remote Postmaster",1:"no known path") W !,*7,"(",$S('$D(XMMG):Y,XMMG="":Y,1:XMMG),")"
  1. S Y=$S($D(^XMB(3.9,XMNETREC(0),5)):^(5),1:XMNETREC(0)_"@"_^XMB("NETNAME")),%=$S($D(^XMB(3.9,XMNETREC(0),"K")):^("K"),1:""),^XMB(3.9,XMZ,"IN")=Y I $L(%) S ^("K")=%
  1. D ENT1^XMAD1 D POP ;I '$D(XMCHAN) W !,"Network Reply complete !" ;IHS/MFD commented out
  1. Q:$D(IHS) ;IHS/MFD
  1. ARQ K XMNETREC,XMSUB Q
  1. ARS W !!,"Response will only be local !",!! D POP G ARQ
  1. ACHK I X["@",$P(X,"@")["POSTMASTER" S Y=-1,XMMG="Replies to message from remote POSTMASTERS not allowed !"_$C(7) Q
  1. N % D INSTXM^XMA21 Q
  1. ZIS Q:$D(IORVON) S X="IORVON;IORVOFF;IOBON;IOBOFF" D ENDR^%ZISS Q
  1. POP Q:'$D(XMNETREC(0)) S XMZ=XMNETREC(0),XMR=XMNETREC("XMR") Q
  1. IHS ;IHS/MFD added subroutine looking for network recipients
  1. N X S X=""
  1. F S X=$O(^XMB(3.9,XMZ,1,"C",X)) Q:X="" I X["@" S (XMNETREC,IHS)=1 Q
  1. Q
  1. IHS1 S IHSX=""
  1. F S IHSX=$O(^XMB(3.9,XMZ,1,"C",IHSX)) Q:IHSX="" I IHSX["@" S IHSREC="<"_IHSX_">" I $D(XMNETREC) D AR
  1. Q