MimeMultipart
classin packageklyn.mails
public class MimeMultipart extends Object:
MIME multipart container.
Supported subtypes include `mixed`, `alternative` and `related`.
import klyn.mails
multipart = MimeMultipart("alternative")
multipart.addText("Hello")
multipart.addHtml("<strong>Hello</strong>")
Fields
| Modifier and Type |
Member |
Description |
| public readonly |
headers |
Additional multipart headers. |
Properties
| Modifier and Type |
Member |
Description |
| public property |
boundary |
Boundary marker used for serialization. |
| public readonly property |
partCount |
Returns the number of direct child parts. |
| public property |
subType |
Multipart subtype, for example `mixed` or `alternative`. |
Constructors
| Modifier and Type |
Member |
Description |
| public |
MimeMultipart |
Creates a multipart container. |
Methods
| Modifier and Type |
Member |
Description |
| public |
addHtml |
Adds an HTML body part. |
| public |
addMultipart |
Adds a nested multipart. |
| public |
addPart |
Adds a body part. |
| public |
addText |
Adds a plain text body part. |
| public |
attachBase64 |
Adds an attachment whose payload is already Base64-encoded. |
| public |
attachBase64 |
Adds a Base64 attachment with an explicit content type. |
| public |
attachText |
Adds a text attachment. |
| public |
attachText |
Adds a text attachment with an explicit content type. |
| public |
clear |
Removes all child parts. |
| public |
header |
Adds or replaces a multipart header. |
| public static |
mixed |
Creates a `multipart/mixed` container. |
| public static |
related |
Creates a `multipart/related` container. |