MCPcopy Create free account
hub / github.com/chatmail/core / set_html

Method set_html

src/html.rs:46–54  ·  view source on GitHub ↗

Set HTML-part part of a message that is about to be sent. The HTML-part is written to the database before sending and used as the `text/html` part in the MIME-structure. Received HTML parts are handled differently, they are saved together with the whole MIME-structure in `mime_headers` and the HTML-part is extracted using `MsgId::get_html()`. (To underline this asynchronicity, we are using the wo

(&mut self, html: Option<String>)

Source from the content-addressed store, hash-verified

44 /// in `mime_headers` and the HTML-part is extracted using `MsgId::get_html()`.
45 /// (To underline this asynchronicity, we are using the wording "SendHtml")
46 pub fn set_html(&mut self, html: Option<String>) {
47 if let Some(html) = html {
48 self.param.set(SendHtml, html);
49 self.mime_modified = true;
50 } else {
51 self.param.remove(SendHtml);
52 self.mime_modified = false;
53 }
54 }
55}
56
57/// Type defining a rough mime-type.

Callers 6

cmdlineFunction · 0.45
dc_msg_set_htmlFunction · 0.45
create_messageMethod · 0.45
forward_msgs_2ctxFunction · 0.45
test_set_htmlFunction · 0.45

Calls 2

setMethod · 0.45
removeMethod · 0.45

Tested by 2

test_set_htmlFunction · 0.36