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>)
| 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. |