type

FilePart

src class FilePart : EmailPart

FilePart is used to transfer binary content from a File.

constructors

make

Construct with default type of "text/plain".

fields

file

File content

methods

encode

Encode as a MIME message according to RFC 822.

validate

Validate this part - throw Err if not configured correctly

Slot Details

encode

src virtual override Void encode(OutStream out)

Encode as a MIME message according to RFC 822.

file

src File? file

File content

make

src new make()

Construct with default type of "text/plain".

validate

src virtual override Void validate()

Validate this part - throw Err if not configured correctly:

  • file must be non-null
  • if Content-Type not set, defaults to file.mimeType
  • if Content-Type name param not set, defaults to file.name
  • Content-Transfer-Encoding must be base64