package email_message
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=3aa5c85da8530c277cf9e72e18861b235b3b872f08c87f118c04478433320ebb
doc/email_message.kernel/Email_message_kernel/Content/index.html
Module Email_message_kernel.Content
Source
The 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.
type t =
| Multipart of Multipart.t
| Message of Email_message_kernel__.Email.t
| Data of Octet_stream.t
val parse :
?container_headers:Headers.t ->
Email_message_kernel__.Email.t ->
t Core.Or_error.t
parse ?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 map_data :
?on_unparsable_content:[ `Skip | `Raise ] ->
Email_message_kernel__.Email.t ->
f:(Octet_stream.t -> Octet_stream.t) ->
Email_message_kernel__.Email.t
Allow changing the message content to mask the actual data but retain the structure