moonbit-community/email/core does not have a README file
pub struct BinaryBody {
content_type : ContentType
disposition : ContentDisposition
transfer_encoding : TransferEncoding
filename : String?
content_id : ContentId?
source : AttachmentSource
} derive(Eq, Debug)pub enum Body {
Text(TextBody)
Binary(BinaryBody)
Multipart(MultipartKind, Array[Body])
} derive(Eq, Debug)fn Body::attachment_file(filename : String, path : String, content_type? : ContentType) -> Result[Body, ValidationError]fn Body::binary(content_type : ContentType, disposition : ContentDisposition, transfer_encoding : TransferEncoding, filename : String?, content_id : ContentId?, source : AttachmentSource) -> Result[Body, ValidationError]fn Body::inline_asset(content_id : String, filename : String, content_type : ContentType, data : Array[Byte]) -> Result[Body, ValidationError]fn Body::inline_asset_file(content_id : String, filename : String, path : String, content_type : ContentType) -> Result[Body, ValidationError]fn Body::text(content_type : ContentType, charset : Charset, transfer_encoding : TransferEncoding, content : String) -> Bodypub struct ContentDisposition {
kind : DispositionKind
filename : String?
parameters : Array[HeaderParam]
} derive(Eq, Debug)fn ContentDisposition::new(kind : DispositionKind, filename? : String, parameters? : Array[HeaderParam]) -> Result[ContentDisposition, ValidationError]pub struct ContentType {
top_level : String
sub_type : String
parameters : Array[HeaderParam]
} derive(Eq, Debug)fn ContentType::new(top_level : String, sub_type : String, parameters : Array[HeaderParam]) -> ContentTypepub struct TextBody {
content_type : ContentType
charset : Charset
transfer_encoding : TransferEncoding
content : String
} derive(Eq, Debug)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)Install
Download zipA MoonBit email library with facade APIs for composing, encoding, and sending messages over SMTP.