Class Netmime.basic_mime_header


class basic_mime_header : ?ro:bool -> (string * string) list -> mime_header
An implementation of mime_header.

The argument is the list of (name,value) pairs of the header.

Example: Create a MIME header with only the field "Content-type":

 let h = new basic_mime_header ["content-type", "text/plain"] 

Example: Set the field "Subject":

 h # update_field "subject" "The value of this field" 

This mime_header implementation bases on a mixture of a Map data structure and a doubly linked list. The efficiency of the operations (n=number of fields; m=average number of values per field; n*m=total number of values):


ro : whether the header is read-only (default: false)