TapHow email works (3) Attachments

The body of an email is a continuous stream of plain text lines, each no more than 80 characters long (remember punched cards?) and terminated by a line containing just a single dot “.” this doesn’t allow for much other than simple messages. To get round the restrictions and allow the sending of other types of data, uuencode (unix to unix encode) was borrowed from another system. This allows any data, including binary, to be transformed into plain printable characters, though you wouldn’t want to read them. A corresponding program uudecode converts it back to the original form without loss. The drawbacks to this are that the message increases in size and that the process is very manual. The first problem was addressed by compression but that made the second problem even worse as it is now a three stage process at each end i.e. compress, uuencode send—receive uudecode uncompress, and some data needed different handling, perhaps a different compress program.

The major development to resolve this was MIME (Multi-purpose Internet Mail Extension). Using this the body of the email is divided into a number of sections, still all in plain text and the whole lot terminated by the “.” The mail server knows nothing about it, it is all handled by the client at each end. Each section has its own sub-header which contains details about what sort of data the section contains and how it is encoded. Then when the mail arrives, it is all sorted out into the message (now perhaps formatted in HTML) and the attachments all with their correct type and name.

Comments are closed.

^ Top