class type mime_body =object
..end
The value of the body can be set either by a string
, or by writing
to an object channel. Both ways are possible independently of where
the value is stored, in-memory, or as external file.
Netmime.mime_body_ro
Supports all these read access method, toomethod ro : bool
method set_value : string -> unit
Immutable
will be raised.
The passed string must be in decoded form. When the body is
stored in an external file, the file is overwritten.
method open_value_wr : unit -> Netchannels.out_obj_channel
Immutable
will be raised.
For example, to copy the file f
into the value:
let ch = body # open_value_wr() in
let f_ch = new Netchannels.input_file f in
ch # output_channel f_ch;
f_ch # close_in();
ch # close_out();