class

TextPart

@Serializable
class TextPart : EmailPart

TextPart is used to model email parts with a text MIME type. The default is "text/plain".

constructors make

Construct with default type of "text/plain"

fields text

Text body of the email part

methods encode

Encode as a MIME message according to RFC 822

validate

Validate this part - throw Err if not configured correctly

encode virtual Void encode(OutStream out)

Encode as a MIME message according to RFC 822.

make new make()

Construct with default type of "text/plain".

text Str : text

Text body of the email part.

validate virtual Void validate()

Validate this part - throw Err if not configured correctly:

  • text must be non-null
  • Content-Type must be defined
  • if Content-Type charset not defined, defaults to utf-8
  • Content-Transfer-Encoding must be 8bit unless using us-ascii

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST