sendr/message/body
This module provides a lax representation of a message body as defined in RFC 5322, section 3.3.
It does not enforce any of the rules and requirements of the RFC. Since we do not know what transformations the Mail Submission Agent will perform and what the Mail Submission Agent is capable of handling.
Types
The body of the message.
A message can have two types of body content:
(1) text: Plain text version of the message body
(2) html: HTML version of the message body
pub type Body {
Body(text: option.Option(String), html: option.Option(String))
}
Constructors
-
Body(text: option.Option(String), html: option.Option(String))
Values
pub fn new(
text text: option.Option(String),
html html: option.Option(String),
) -> Body
Creates a new Body with a text and html body.