EMIL version 2 TUTORIAL

# TUTORIAL FOR EMIL VERSION 2.1

Written by Martin Wendel, ITS, Uppsala university. Martin.Wendel@its.uu.se

## DESIGN SPECIFICATION OF EMIL VERSION 2

### Introduction

It is my ambition to use an object oriented methodology when developing Emil version 2. Much to gain subsystems with crisp boundaries, thereby simplifying programming and debugging, but also to make the whole system easier to grasp.

### The Message

The message itself can be viewed as an object oriented structure in which there are three basic object types: Message, Header and Body.

- The message object consists of a header and a body.
- Each message contain some information specific to the message itself
  - The sender's address
  - The recipient's address
  - The subject
  - The type of format, for example MIME.

### Header

- Header description according to configuration file.
- Handle header folding and header decoding in C-code.
- Hande basic header tokenization in C-code.
- Inside the header there's information that is applicable on the body.

### Body

- Body description according to configuration file.

# Simple functional model

1. While loading message, unfold headers and do basic tokenization.

2. Parse header and compare with the configuration. Assign the description header data variables. Mark unmarked body parts with information.

3. Compare with output configuration file. Decode unsupported encoding types.

4. Encode binary and text according to configuration.

5. Apply the new format headers.

6. Remove the old format headers.