package email_message
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=3aa5c85da8530c277cf9e72e18861b235b3b872f08c87f118c04478433320ebb
doc/email_message.kernel/Email_message_kernel/Simple/Content/index.html
Module Simple.Content
Source
val create_custom :
content_type:Mimetype.t ->
?encoding:Octet_stream.Encoding.known ->
?extra_headers:(Headers.Name.t * Headers.Value.t) list ->
string ->
t
val create :
content_type:Mimetype.t ->
?encoding:Octet_stream.Encoding.known ->
?extra_headers:(Headers.Name.t * Headers.Value.t) list ->
string ->
t
val html_utf8 :
?encoding:Octet_stream.Encoding.known ->
?extra_headers:(Headers.Name.t * Headers.Value.t) list ->
string ->
t
val html :
?encoding:Octet_stream.Encoding.known ->
?extra_headers:(Headers.Name.t * Headers.Value.t) list ->
string ->
t
val text_utf8 :
?encoding:Octet_stream.Encoding.known ->
?extra_headers:(Headers.Name.t * Headers.Value.t) list ->
string ->
t
val text :
?encoding:Octet_stream.Encoding.known ->
?extra_headers:(Headers.Name.t * Headers.Value.t) list ->
string ->
t
val text_monospace_utf8 :
?extra_headers:(Headers.Name.t * Headers.Value.t) list ->
?force_no_line_wrap:bool ->
string ->
t
Plain text e-mail that also includes an html version so it's displayed monospace in gmail.
By default, we add some custom styling to disable the line-wrap formatting rule which gmail uses. To disable this behavior, supply ~force_no_line_wrap:false
.
val text_monospace :
?extra_headers:(Headers.Name.t * Headers.Value.t) list ->
?force_no_line_wrap:bool ->
string ->
t
Combine 2 or more contents as alternative versions. List should be sorted from worst to best.
Combine 2 or more contents that should be bundled together
Add related resources (e.g. inline images). You can reference them using 'cid:$attachment_name
' in the content. To attach files you should use create ~attachments
The Content-ID of the content
content
and parts
return None
if the email doesn't properly parse. They also return None
if the message has content type "message/rfc822"
Get the alternative versions available. If the message is not of content type "multipart/alternative" then return a singleton list.
Get the 'inline' parts, This expands "Content-Type: multipart/mixed,related
", stripping out any attachment parts. multipart/alternative is not expanded