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

XMJMA.m

Go to the documentation of this file.
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