Attachment

class Attachment(val name: String, val content: ByteArray, val contentType: String = guessContentType(name), val contentId: String? = null)(source)

A file attached to an Email.

If contentId is set, the attachment is rendered inline and can be referenced from the HTML body via cid:<contentId>, e.g. <img src="cid:logo@example.com">.

Constructors

Link copied to clipboard
constructor(name: String, content: ByteArray, contentType: String = guessContentType(name), contentId: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

True if this attachment is embedded into the HTML body.

Link copied to clipboard

Functions

Link copied to clipboard
open override fun toString(): String