binaryFile

fun binaryFile(path: Path, mimeType: String)(source)

Adds Attachment.File with AttachmentContent.Binary.Bytes content from the provided local file path.

Parameters

path

Path to local file

mimeType

MIME type of the file (e.g., "application/pdf", "text/plain")

Throws

if the path is not valid, the file does not exist, or is not a regular file.