emailler/README-attacher.md

48 lines
3.1 KiB
Markdown
Raw Normal View History

# Apple II Email and Usenet News Suite
<p align="center"><img src="img/emailler-logo.png" alt="emai//er-logo" height="200px"></p>
2020-10-30 22:13:13 +00:00
[Back to Main emai//er Docs](README.md#detailed-documentation-for-email-functions)
## `ATTACHER.SYSTEM`
2020-10-30 01:44:09 +00:00
*Automatically invoked when exiting `EDIT.SYSTEM` when using the `W` (write email), `F` (forward email) or `R` (reply) commands in `EMAIL.SYSTEM`*
`ATTACHER.SYSTEM` is used for attaching files to outgoing email messages. This program is started automatically by `EDIT.SYSTEM` and is not normally invoked directly.
2020-10-30 01:44:09 +00:00
Here is how it looks when it first starts up - there are no attachments yet:
<p align="center"><img src="img/attacher-0.png" alt="Attacher Startup" height="400px"></p>
Using the file selector to choose an attachment:
<p align="center"><img src="img/attacher-fileui.png" alt="Attacher File UI" height="300px"></p>
2020-10-30 02:19:42 +00:00
Navigate up the to the top level 'Volumes' by repeatedly selecting the `..` entry and hitting `Return`.
2020-10-30 01:46:07 +00:00
<p align="center"><img src="img/attacher-fileui-vols.png" alt="Attacher File UI" height="300px"></p>
2020-10-30 02:19:42 +00:00
The navigate down to the directory of interest, select the file to attach and hit `Return`.
2020-10-30 01:46:07 +00:00
<p align="center"><img src="img/attacher-fileui-select.png" alt="Attacher File UI" height="300px"></p>
2020-10-30 01:44:09 +00:00
2020-10-30 02:19:42 +00:00
Now `ATTACHER.SYSTEM` shows there is a file attached.
2020-10-30 01:44:09 +00:00
<p align="center"><img src="img/attacher-1.png" alt="Attacher with One File" height="300px"></p>
When `EDIT.SYSTEM` invokes `ATTACHER.SYSTEM`, the following operations occur:
2020-10-30 00:46:05 +00:00
- The outgoing email message is loaded from `OUTBOX` and copied to a temporary file. While copying, additional email headers are appended to indicate that this is a MIME multi-part message.
- A `plain/text` MIME section header is added to the email body (which becomes the first section in the multi-part MIME document.)
2020-10-30 01:01:09 +00:00
- `ATTACHER.SYSTEM` loops until the user says they are done adding attachments:
- Display the current number of attached files. Initially this shows `There are currently 0 attachments`.
- Display a list of the files that have been attached so far.
- Prompt: `A)dd attachment | D)one with attachments`.
- If the user chooses 'D' then we are done adding attachments. Exit the loop.
- If the user chooses 'A' then a file selector is shown, allowing the user to choose the file to attach. Navigate to the desired directory and select the file to be attached. Alternatively, you can hit the `Tab` key and type in the absolute or relative path to the file to be attached.
- The selected file is loaded from disk and encoded using the Base64 algorithm. A MIME section is created in the outgoing email and the Base64-encoded file data is appended.
- `ATTACHER.SYSTEM` will terminate the MIME document, erase the original email file from `OUTBOX` and rename the temporary file to replace the original.
- `ATTACHER.SYSTEM` will reload `EMAIL.SYSTEM` once it is done.
2020-10-30 01:44:09 +00:00
Here is how the Base64-encoded email attachment is encoded:
<p align="center"><img src="img/edit-email-base64.png" alt="Base64 Encoded" height="400px"></p>
2020-10-30 22:13:13 +00:00
[Back to Main emai//er Docs](README.md#detailed-documentation-for-email-functions)