1 04/21/82  send_mail_
  2 
  3 
  4 Entry points in send_mail_:
  5    (List is generated by the help command)
  6 
  7 
  8 :Entry: send_mail_:  04/05/82  send_mail_
  9 
 10 
 11 Function: sends an interactive message or mail to a specified user.
 12 
 13 
 14 Syntax:
 15 declare send_mail_ entry (char(*), char(*), ptr, fixed bin(35));
 16 call send_mail_ (destination, message, info_ptr, code);
 17 
 18 
 19 Arguments:
 20 destination
 21    is a Person_id.Project_id destination.  (Input)
 22 message
 23    is the text of the message to be sent.  (Input)
 24 info_ptr
 25    points to the structure declared in send_mail_info.incl.pl1.
 26    (Input)  See "Notes on info structure" below.
 27 
 28 
 29 code
 30    is a standard status code.  (Output) It may be one of the following:
 31    error_table_$noentry
 32         if the mailbox is not found
 33    error_table_$no_append
 34         if the sending process has insufficient access to add a message
 35    error_table_$wakeup_denied
 36         the sending process has insufficient access to send a wakeup
 37    error_table_$messages_deferred
 38         if the recipient process is deferring messages
 39    error_table_$messages_off
 40         if the recipient is not logged in or the recipient process has
 41         not been initialized for receiving messages
 42    error_table_$no_info
 43         if the sending process is not given any information because it
 44         has a lower AIM authorization than the recipient process
 45 
 46 
 47 Notes on info structure:
 48 The info_ptr pointer points to the following structure (found in the
 49 include file, send_mail_info.incl.pl1):
 50 
 51      dcl 1 send_mail_info    aligned,
 52            2 version         fixed bin,
 53            2 sent_from       char(32) aligned,
 54            2 switches,
 55              3 wakeup        bit(1) unal,
 56              3 mbz 1         bit(1) unal,
 57              3 always_add    bit(1) unal,
 58              3 never_add     bit(1) unal,
 59              3 notify        bit(1) unal,
 60              3 acknowledge   bit(1) unal,
 61              3 mbz           bit(30) unal;
 62 
 63 
 64 Structure elements:
 65    version
 66       identifies the version of the structure being used.  Currently
 67       this number must be 2.
 68    sent_from
 69       gives additional information about the sender, e.g., name of
 70       anonymous user or name of network site.
 71    wakeup
 72       indicates whether a wakeup is sent with the message.
 73       "1"b   yes
 74       "0"b   no
 75 
 76 
 77    always_add
 78       indicates whether the message is to be added even if a wakeup
 79       could not be sent.
 80       "1"b   yes
 81       "0"b   no
 82    never_add
 83       tests whether a wakeup can be sent, without trying to add a
 84       message.
 85       "1"b   yes
 86       "0"b   no
 87 
 88 
 89    notify
 90       indicates that this message is a mail notification.  After
 91       sending a piece of mail, a second message should be sent which
 92       has the bit ON so that the receiving process (if any) will print
 93       the "You have mail." notification.
 94       "1"b   this is a mail notification
 95       "0"b   this is NOT a mail notification, but either mail or an
 96              interactive message depending on the "wakeup" bit above.
 97    acknowledge
 98       indicates whether an acknowledgement is requested when the
 99       message is read.
100       "1"b   yes
101       "0"b   no
102    mbz1, mbz
103       are not used and must be set to "0"b.
104 
105 
106 :Entry: access_class:  04/05/82  send_mail_$access_class
107 
108 
109 Function:  This entry is identical to send_mail_, except that the
110 caller may specify the access class of the message.  (In send_mail_,
111 the access class of the message is always equal to the authorization of
112 the calling process.)  This entry is of use only if a site is using
113 AIM.  For information on access classes, see "Nondiscretionary Access
114 Control" in Section VI of the MPM Reference Guide.
115 
116 
117 Syntax:
118 declare send_mail_$access_class entry (char(*), char(*), ptr,
119      bit(72) aligned, fixed bin(35));
120 call send_mail_$access_class (destination, message, info_ptr,
121      access_class, code);
122 
123 
124 Arguments:
125 destination
126    is a Person_id.Project_id destination.  (Input)
127 message
128    is the text of the message to be sent.  (Input)
129 info_ptr
130    points to the structure declared in send_mail_info.incl.pl1.
131    (Input)  See "Notes on info structure" under the description of the
132    send_mail_ entry point.
133 access_class
134    is the access class of the message.  (Input)
135 code
136    is a standard status code. (Output)
137 
138 
139 Notes:  Normally the message is written into the mailbox of the
140 receiver at the access_class specified by the sender.  However, if
141 send_mail_info.wakeup is "1"b and the receiver is accepting messages,
142 and further, if the authorization of the receiver is greater than or
143 equal to the access_class of the message, the access_class of the
144 message is automatically upgraded to the authorization of the receiver.
145 This allows the receiver to delete the message once he has read it.
146 
147 
148 :Entry: path:  04/05/82  send_mail_$path
149 
150 
151 Function:  This entry point sends an interactive message or mail to a
152 specified mailbox.
153 
154 
155 Syntax:
156 declare send_mail_$path entry (char(*), char(*), char(*), ptr,
157      fixed bin (35));
158 call send_mail_$path (dir_name, entryname, message, info_ptr, code);
159 
160 
161 Arguments:
162 dir_name
163    is the directory name of a mailbox.  (Input)
164 entryname
165    is the entryname of a mailbox.  (Input) The .mbx suffix is added if
166    it is not supplied.
167 message
168    is the text of the message to be sent.  (Input)
169 info_ptr
170    points to the structure declared in send_mail_info.incl.pl1.
171    (Input)  See "Notes on info structure" under the description of the
172    send_mail_ entry point.
173 code
174    is a standard status code.  (Output)
175 
176 
177 :Entry: path_access_class:  04/05/82  send_mail_$path_access_class
178 
179 
180 Function:  This entry point sends a message to a specified mailbox,
181 allowing the user to specify the access class of the message.
182 
183 
184 Syntax:
185 declare send_mail_$path_access_class entry (char(*), char(*), char(*),
186      ptr, bit(72) aligned, fixed bin (35));
187 call send_mail_$path_access_class (dir_name, entryname, message,
188      info_ptr, access_class, code);
189 
190 
191 Arguments:
192 dir_name
193    is the directory name of a mailbox.  (Input)
194 entryname
195    is the entryname of a mailbox.  (Input) The .mbx suffix is added if
196    it is not supplied.
197 message
198    is the text of the message to be sent.  (Input)
199 info_ptr
200    points to the structure declared in send_mail_info.incl.pl1.
201    (Input)  See "Notes on info structure" under the description of the
202    send_mail_ entry point.
203 access_class
204    is the access class of the message.  (Input)
205 code
206    is a standard status code.  (Output)