Email_message_kernel.ContentThe cost depends on the encoding of the content and the main media type. N = Size of the message H = Size of the headers of the sub-message(s) Format: time complexity, memory complexity . | 7bit, 8bit, binary | Base64, Quoted_printable ------------------------------------------------------------- message | O(N), O(H) | O(N), O(N) multipart | O(N), O(H) | O(N), O(N) other | O(1), O(1) | O(N), O(N) Where other is any other main media type: text, image, application... Encoding and type can be obtained from the headers, using the modules Headers.Content_type and Headers.Content_transfer_encoding, and the corresponding default values.
module Multipart : sig ... endtype t = | Multipart of Multipart.t| Message of Email_message_kernel__.Email.t| Data of Octet_stream.tval sexp_of_t : t -> Sexplib0.Sexp.tval parse :
?container_headers:Headers.t ->
Email_message_kernel__.Email.t ->
t Core.Or_error.tparse ?container_headers email parses the content of email. The default content type of a multipart body changes based on the container headers. This only comes into play if the container had "Content-Type: multipart/digest".
val set_content :
Email_message_kernel__.Email.t ->
t ->
Email_message_kernel__.Email.tval map_data :
?on_unparsable_content:[ `Skip | `Raise ] ->
Email_message_kernel__.Email.t ->
f:(Octet_stream.t -> Octet_stream.t) ->
Email_message_kernel__.Email.tAllow changing the message content to mask the actual data but retain the structure
val to_raw_content : t -> Email_message_kernel__.Email_raw_content.tval to_string_monoid : t -> String_monoid.t