source: VWGUIRegistration/trunk/BFPMAIL.m@ 1764

Last change on this file since 1764 was 1747, checked in by Jim B., 8 years ago
File size: 2.5 KB
Line 
1BJMAIL ; PTLD/JEB ; Generic mail message ; January 1990
2 ;;3.0;WORLD VISTA/JEB;** **;;Build: 3
3 ;; General Public License: See WVLCI.txt
4 ;User program sets variables calls MSG^BJMAIL (See variable List)
5 ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 ; | VARIABLE LIST: |
7 ; | SET 'GROUP' TO THE MAIL GROUP NAME OR NUMBER |
8 ; | or |
9 ; | K GROUP AND SET UP A 'TO()' ARRAY WITH THE DUZ AS THE SUBSCRIPT OF |
10 ; | THE 'TO' ARRAY IF YOU WANT TO SEND A MSG TO AN INDIVIDUAL OR GROUP |
11 ; | OF INDIVIDUALS WHO ARE NOT IN AN ESTABLISHED MAIL GROUP |
12 ; | or |
13 ; | SET 'GROUP' AND INDIVIDUAL 'T()' ARRAY NODES TO SEND TO THE |
14 ; | ESTABLISHED GROUP AND INDIVIDUALS NOT IN THE GROUP |
15 ; | SET 'TITLE'=TO THE TITLE YOU WANT DISPLAYED |
16 ; | SET 'FROM' AS THE PERSON WHO IS SENDING THE MESSAGE ( A NULL 'FROM' |
17 ; | WILL USE THE POSTMASTER). |
18 ; | SET THE TEXT OF THE MESSAGE IN ARRAY USING 'T' AND SUBSCRIPT OF A NUMBER|
19 ; | I.,E |
20 ; | T(1)="This is the first line of the message" |
21 ; | T(2)="This is the second line of the message, etc. |
22 ; | SET 'CONFIRM'=1 FOR A CONFIRMATION |
23 ; | SET 'INFO'=1 FOR INFORMATION ONLYH (NO REPLIES ALLOWED) MESSAGE |
24 ; | SET 'PRIO'=1 FOR PRIORITY DELIVERY |
25MSG ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 N XMINSTR
27 D GROUP
28 Q:$O(TO(""))=""
29 ;
30 I $G(CONFIRM) S XMINSTR("FLAGS")=$G(XMINSTR("FLAGS"))_"R"
31 I $G(PRIO) S XMINSTR("FLAGS")=$G(XMINSTR("FLAGS"))_"P"
32 I $G(INFO) S XMINSTR("FLAGS")=$G(XMINSTR("FLAGS"))_"I"
33 I '$D(FROM) S FROM=.5
34 D SETFROM^XMD(.FROM,.XMINSTR)
35 I '$D(TITLE) S TITLE="Title not specified by sender"
36 I $L(TITLE)>65 S TITLE=$E(TITLE,1,65)
37 I $L(TITLE)<3 S TITLE=TITLE_"..."
38 D SENDMSG^XMXAPI(FROM,TITLE,"T",.TO,.XMINSTR)
39 K CONFIRM,FROM,GROUP,INFO,PRIO,T,TITLE,TO
40 Q
41GROUP ;
42 Q:$G(GROUP)=""
43 I +GROUP=GROUP S GROUP=$P($G(^XMB(3.8,GROUP,0)),"^")
44 S TO("G."_GROUP)=""
45 Q
46 ;
Note: See TracBrowser for help on using the repository browser.