MimeBodyPart
classin packageklyn.mails
public class MimeBodyPart extends Object:
MIME body part.
The class can represent a text part, an HTML part or an attachment whose
content is already available either as text or as Base64.
import klyn.mails
part = MimeBodyPart.text("Hello")
print(part.contentType)
Fields
| Modifier and Type |
Member |
Description |
| public |
MimeBodyPart(content |
Creates a MIME body part. |
| public readonly |
headers |
Additional MIME headers for this part. |
Properties
| Modifier and Type |
Member |
Description |
| public property |
content |
Raw part content or already-encoded Base64 content. |
| public property |
contentDisposition |
Optional Content-Disposition header value. |
| public property |
contentId |
Optional inline content identifier. |
| public property |
contentType |
MIME content type. |
| public property |
fileName |
Optional attachment or inline file name. |
| public property |
transferEncoding |
Content-Transfer-Encoding header value. |
Methods
| Modifier and Type |
Member |
Description |
| public |
asAttachment |
Marks this part as an attachment. |
| public |
asInline |
Marks this part as inline content. |
| public static |
attachmentBase64 |
Creates an attachment from Base64 content. |
| public static |
attachmentBase64 |
Creates a Base64 attachment with an explicit content type. |
| public static |
attachmentText |
Creates a text attachment. |
| public static |
attachmentText |
Creates a text attachment with an explicit content type. |
| public |
header |
Adds or replaces a MIME header on this part. |
| public static |
html |
Creates an HTML body part. |
| public static |
text |
Creates a plain text body part. |