moonbit-community/email/core does not have a README file

    AttachmentSource

    pub enum AttachmentSource {
    InMemory(Array[Byte])
    FilePath(String)
    } derive(Eq,
    Debug
    )

    AttachmentSource::file_path

    fn AttachmentSource::file_path(path : String) -> AttachmentSource

    AttachmentSource::in_memory

    fn AttachmentSource::in_memory(data : Array[Byte]) -> AttachmentSource

    BinaryBody

    pub struct BinaryBody {
    content_type : ContentType
    disposition : ContentDisposition
    transfer_encoding : TransferEncoding
    filename : String?
    content_id : ContentId?
    source : AttachmentSource
    } derive(Eq,
    Debug
    )

    Body

    pub enum Body {
    Text(TextBody)
    Binary(BinaryBody)
    Multipart(MultipartKind, Array[Body])
    } derive(Eq,
    Debug
    )

    Body::alternative

    fn Body::alternative(parts : Array[Body]) -> Result[Body, ValidationError]

    Body::attachment

    fn Body::attachment(filename : String, data : Array[Byte]) -> Result[Body, ValidationError]

    Body::attachment_file

    fn Body::attachment_file(filename : String, path : String, content_type? : ContentType) -> Result[Body, ValidationError]

    Body::binary

    fn Body::binary(content_type : ContentType, disposition : ContentDisposition, transfer_encoding : TransferEncoding, filename : String?, content_id : ContentId?, source : AttachmentSource) -> Result[Body, ValidationError]

    Body::html

    fn Body::html(content : String) -> Body

    Body::inline_asset

    fn Body::inline_asset(content_id : String, filename : String, content_type : ContentType, data : Array[Byte]) -> Result[Body, ValidationError]

    Body::inline_asset_file

    fn Body::inline_asset_file(content_id : String, filename : String, path : String, content_type : ContentType) -> Result[Body, ValidationError]

    Body::mixed

    fn Body::mixed(parts : Array[Body]) -> Result[Body, ValidationError]

    Body::multipart

    fn Body::multipart(kind : MultipartKind, parts : Array[Body]) -> Result[Body, ValidationError]

    Body::plain_text

    fn Body::plain_text(content : String) -> Body

    Body::related

    fn Body::related(parts : Array[Body]) -> Result[Body, ValidationError]

    Body::text

    fn Body::text(content_type : ContentType, charset : Charset, transfer_encoding : TransferEncoding, content : String) -> Body

    Charset

    pub enum Charset {
    Utf8
    UsAscii
    Other(String)
    } derive(Eq,
    Debug
    )

    Charset::other

    fn Charset::other(name : String) -> Charset

    Charset::us_ascii

    fn Charset::us_ascii() -> Charset

    Charset::utf8

    fn Charset::utf8() -> Charset

    ContentDisposition

    pub struct ContentDisposition {
    kind : DispositionKind
    filename : String?
    parameters : Array[HeaderParam]
    } derive(Eq,
    Debug
    )

    ContentDisposition::new

    fn ContentDisposition::new(kind : DispositionKind, filename? : String, parameters? : Array[HeaderParam]) -> Result[ContentDisposition, ValidationError]

    ContentId

    pub struct ContentId {
    value : String
    } derive(Eq,
    Debug
    )

    ContentId::new

    fn ContentId::new(value : String) -> Result[ContentId, ValidationError]

    ContentType

    pub struct ContentType {
    top_level : String
    sub_type : String
    parameters : Array[HeaderParam]
    } derive(Eq,
    Debug
    )

    ContentType::application_octet_stream

    fn ContentType::application_octet_stream() -> ContentType

    ContentType::new

    fn ContentType::new(top_level : String, sub_type : String, parameters : Array[HeaderParam]) -> ContentType

    ContentType::text_html

    fn ContentType::text_html() -> ContentType

    ContentType::text_plain

    fn ContentType::text_plain() -> ContentType

    DispositionKind

    pub enum DispositionKind {
    Inline
    Attachment
    Other(String)
    } derive(Eq,
    Debug
    )

    DispositionKind::attachment

    fn DispositionKind::attachment() -> DispositionKind

    DispositionKind::inline

    DispositionKind::other

    fn DispositionKind::other(name : String) -> DispositionKind

    Envelope

    pub struct Envelope {
    mail_from : Mailbox
    rcpt_to : Array[Mailbox]
    } derive(Eq,
    Debug
    )

    Envelope::from_message

    fn Envelope::from_message(mail_from : Mailbox, message : Message) -> Result[Envelope, ValidationError]

    Envelope::new

    fn Envelope::new(mail_from : Mailbox, rcpt_to : Array[Mailbox]) -> Result[Envelope, ValidationError]

    pub struct Header {
    name : String
    value : String
    } derive(Eq,
    Debug
    )

    Header::new

    fn Header::new(name : String, value : String) -> Result[Header, ValidationError]

    HeaderParam

    pub struct HeaderParam {
    name : String
    value : String
    } derive(Eq,
    Debug
    )

    HeaderParam::new

    fn HeaderParam::new(name : String, value : String) -> HeaderParam

    Mailbox

    pub struct Mailbox {
    display_name : String?
    address : String
    } derive(Eq,
    Debug
    )

    Mailbox::address_only

    fn Mailbox::address_only(address : String) -> Result[Mailbox, ValidationError]

    Mailbox::new

    fn Mailbox::new(address : String, display_name : String?) -> Result[Mailbox, ValidationError]

    Message

    pub struct Message {
    from : Mailbox
    to : Array[Mailbox]
    cc : Array[Mailbox]
    bcc : Array[Mailbox]
    subject : String
    headers : Array[Header]
    body : Body
    } derive(Eq,
    Debug
    )

    Message::all_recipients

    fn Message::all_recipients(self : Message) -> Array[Mailbox]

    Message::new

    fn Message::new(from : Mailbox, to : Array[Mailbox], cc : Array[Mailbox], bcc : Array[Mailbox], subject : String, body : Body, headers : Array[Header]) -> Result[Message, ValidationError]

    MultipartKind

    pub enum MultipartKind {
    Mixed
    Alternative
    Related
    Custom(String)
    } derive(Eq,
    Debug
    )

    MultipartKind::alternative

    fn MultipartKind::alternative() -> MultipartKind

    MultipartKind::custom

    fn MultipartKind::custom(name : String) -> MultipartKind

    MultipartKind::mixed

    MultipartKind::related

    fn MultipartKind::related() -> MultipartKind

    TextBody

    pub struct TextBody {
    content_type : ContentType
    charset : Charset
    transfer_encoding : TransferEncoding
    content : String
    } derive(Eq,
    Debug
    )

    TransferEncoding

    pub enum TransferEncoding {
    SevenBit
    EightBit
    QuotedPrintable
    Base64
    Binary
    } derive(Eq,
    Debug
    )

    TransferEncoding::base64

    TransferEncoding::binary

    TransferEncoding::eight_bit

    TransferEncoding::quoted_printable

    fn TransferEncoding::quoted_printable() -> TransferEncoding

    TransferEncoding::seven_bit

    ValidationError

    pub(all) enum ValidationError {
    EmptyAddress
    MissingAtSign
    MultipleAtSigns
    MissingLocalPart
    MissingDomain
    UnexpectedWhitespace
    EmptyHeaderName
    IllegalHeaderNameChar(Char)
    IllegalHeaderValueChar(Char)
    EmptyRecipients
    EmptyMessageRecipients
    EmptyMultipart
    AlternativeNeedsTwoParts
    AlternativeRequiresTextParts
    EmptyFilename
    EmptyContentId
    } derive(Eq,
    Debug
    )

    Shared validation errors for core domain constructors.

    Powered by MoonBit

    Site sourceReport issueModulesSkillsBuild queueStatistics

    © 2026 mooncakes.io