XMJMA ;ISC-SF/GMB-Interactive Answer ;04/24/2002 10:32
;;8.0;MailMan;;Jun 28, 2002
; Replaces ^XMA11A,^XMA11B,SH^XMA1B,^XMA2,^XMA20 (ISC-WASH/CAP/THM)
ANSWER(XMDUZ,XMZO,XMZOSUBJ,XMZOFROM) ;
N XMABORT,XMZ,XMINSTR,XMSUBJ,XMZODATE
S XMABORT=0
D INIT(XMDUZ,XMZO,.XMZODATE,.XMINSTR,.XMABORT) Q:XMABORT
S XMSUBJ=$E($$EZBLD^DIALOG(37006)_XMZOSUBJ,1,65) ; Re:
D SUBJ^XMJMS(.XMSUBJ,.XMABORT) Q:XMABORT
D CRE8XMZ^XMXSEND(XMSUBJ,.XMZ,1) I XMZ<1 S XMABORT=1 Q
D EDITON^XMJMS(XMDUZ,XMZ)
D PROCESS(XMDUZ,XMZO,XMZOSUBJ,XMZOFROM,XMZODATE,XMZ,XMSUBJ,.XMINSTR,.XMABORT)
D CLEANUP^XMXADDR
D:XMABORT=DTIME HALT^XMJMS($$EZBLD^DIALOG(34250)) ; answering
D EDITOFF^XMJMS(XMDUZ)
D:XMABORT KILLMSG^XMXUTIL(XMZ)
Q
INIT(XMDUZ,XMZO,XMZODATE,XMINSTR,XMABORT) ;
D INIT^XMJMS(XMDUZ,.XMABORT) Q:XMABORT
S XMZODATE=$P($G(^XMB(3.9,XMZO,0)),U,3)
Q:$$COPYAMT^XMXSEC1(XMZO,0)
S XMABORT=1
D SHOW^XMJERR
;This message has too many lines to 'Answer'.
;Use 'Write' or 'Reply', instead.
N XMTEXT
D BLD^DIALOG(34251,"","","XMTEXT","F")
D MSG^DIALOG("WE","","","","XMTEXT")
Q
PROCESS(XMDUZ,XMZO,XMZOSUBJ,XMZOFROM,XMZODATE,XMZ,XMSUBJ,XMINSTR,XMABORT) ;
N XMRESTR ;Copying original message and network signature ...
W !,$$EZBLD^DIALOG(34252)
D COPY^XMXANSER(XMZO,XMZOSUBJ,XMZOFROM,XMZODATE,XMZ)
D NETSIG^XMXEDIT(XMDUZ,XMZ)
D BODY^XMJMS(XMDUZ,XMZ,XMSUBJ,.XMRESTR,.XMABORT) Q:XMABORT
I XMZOFROM["@" D Q:XMABORT
. D REPLYTO^XMJMR(XMZO,.XMZOFROM,.XMABORT) Q:XMABORT
. S XMINSTR("EXACT")=1 ; Match on exact domain name
. W !,$$EZBLD^DIALOG(34253,XMZOFROM) ; Addressing answer to:
E W !,$$EZBLD^DIALOG(34254) ; Addressing answer to sender:
D INIT^XMXADDR
D ADDR^XMXADDR(XMDUZ,XMZOFROM,.XMINSTR,.XMRESTR)
I '$D(^TMP("XMY",$J)) W !,$$EZBLD^DIALOG(34255,$$NAME^XMXUTIL(XMZOFROM)) ; Failed in addressing answer to:
K XMRESTR("FLAGS") I $D(XMINSTR("EXACT")) K XMINSTR("EXACT")
D TOWHOM^XMJMT(XMDUZ,$$EZBLD^DIALOG(34110),.XMINSTR,.XMRESTR,.XMABORT) Q:XMABORT ; Send
D SENDMSG^XMJMSO(XMDUZ,XMZ,XMSUBJ,.XMINSTR,.XMRESTR,.XMABORT) Q:XMABORT
Q
XMJMA ;ISC-SF/GMB-Interactive Answer ;04/24/2002 10:32
+1 ;;8.0;MailMan;;Jun 28, 2002
+2 ; Replaces ^XMA11A,^XMA11B,SH^XMA1B,^XMA2,^XMA20 (ISC-WASH/CAP/THM)
ANSWER(XMDUZ,XMZO,XMZOSUBJ,XMZOFROM) ;
+1 NEW XMABORT,XMZ,XMINSTR,XMSUBJ,XMZODATE
+2 SET XMABORT=0
+3 DO INIT(XMDUZ,XMZO,.XMZODATE,.XMINSTR,.XMABORT)
IF XMABORT
QUIT
+4 ; Re:
SET XMSUBJ=$EXTRACT($$EZBLD^DIALOG(37006)_XMZOSUBJ,1,65)
+5 DO SUBJ^XMJMS(.XMSUBJ,.XMABORT)
IF XMABORT
QUIT
+6 DO CRE8XMZ^XMXSEND(XMSUBJ,.XMZ,1)
IF XMZ<1
SET XMABORT=1
QUIT
+7 DO EDITON^XMJMS(XMDUZ,XMZ)
+8 DO PROCESS(XMDUZ,XMZO,XMZOSUBJ,XMZOFROM,XMZODATE,XMZ,XMSUBJ,.XMINSTR,.XMABORT)
+9 DO CLEANUP^XMXADDR
+10 ; answering
IF XMABORT=DTIME
DO HALT^XMJMS($$EZBLD^DIALOG(34250))
+11 DO EDITOFF^XMJMS(XMDUZ)
+12 IF XMABORT
DO KILLMSG^XMXUTIL(XMZ)
+13 QUIT
INIT(XMDUZ,XMZO,XMZODATE,XMINSTR,XMABORT) ;
+1 DO INIT^XMJMS(XMDUZ,.XMABORT)
IF XMABORT
QUIT
+2 SET XMZODATE=$PIECE($GET(^XMB(3.9,XMZO,0)),U,3)
+3 IF $$COPYAMT^XMXSEC1(XMZO,0)
QUIT
+4 SET XMABORT=1
+5 DO SHOW^XMJERR
+6 ;This message has too many lines to 'Answer'.
+7 ;Use 'Write' or 'Reply', instead.
+8 NEW XMTEXT
+9 DO BLD^DIALOG(34251,"","","XMTEXT","F")
+10 DO MSG^DIALOG("WE","","","","XMTEXT")
+11 QUIT
PROCESS(XMDUZ,XMZO,XMZOSUBJ,XMZOFROM,XMZODATE,XMZ,XMSUBJ,XMINSTR,XMABORT) ;
+1 ;Copying original message and network signature ...
NEW XMRESTR
+2 WRITE !,$$EZBLD^DIALOG(34252)
+3 DO COPY^XMXANSER(XMZO,XMZOSUBJ,XMZOFROM,XMZODATE,XMZ)
+4 DO NETSIG^XMXEDIT(XMDUZ,XMZ)
+5 DO BODY^XMJMS(XMDUZ,XMZ,XMSUBJ,.XMRESTR,.XMABORT)
IF XMABORT
QUIT
+6 IF XMZOFROM["@"
Begin DoDot:1
+7 DO REPLYTO^XMJMR(XMZO,.XMZOFROM,.XMABORT)
IF XMABORT
QUIT
+8 ; Match on exact domain name
SET XMINSTR("EXACT")=1
+9 ; Addressing answer to:
WRITE !,$$EZBLD^DIALOG(34253,XMZOFROM)
End DoDot:1
IF XMABORT
QUIT
+10 ; Addressing answer to sender:
IF '$TEST
WRITE !,$$EZBLD^DIALOG(34254)
+11 DO INIT^XMXADDR
+12 DO ADDR^XMXADDR(XMDUZ,XMZOFROM,.XMINSTR,.XMRESTR)
+13 ; Failed in addressing answer to:
IF '$DATA(^TMP("XMY",$JOB))
WRITE !,$$EZBLD^DIALOG(34255,$$NAME^XMXUTIL(XMZOFROM))
+14 KILL XMRESTR("FLAGS")
IF $DATA(XMINSTR("EXACT"))
KILL XMINSTR("EXACT")
+15 ; Send
DO TOWHOM^XMJMT(XMDUZ,$$EZBLD^DIALOG(34110),.XMINSTR,.XMRESTR,.XMABORT)
IF XMABORT
QUIT
+16 DO SENDMSG^XMJMSO(XMDUZ,XMZ,XMSUBJ,.XMINSTR,.XMRESTR,.XMABORT)
IF XMABORT
QUIT
+17 QUIT