BoundaryEnd (NotesMIMEEntity - JavaScript)

The boundary that follows the last child entity in a multipart entity.

Defined in

NotesMIMEEntity

Syntax

getBoundaryEnd() : string

Usage

This property applies to a child entity of a multipart entity. Otherwise, this property is an empty string.

MIME boundaries are constructed from the boundary parameter of the Content-Type header of the parent entity according to the specifications of RFC-2046.

Examples

This button displays the content of the current document if it is in MIME format.
// Do not automatically convert MIME to rich text
session.setConvertMIME(false);
var mime:NotesMIMEEntity = currentDocument.getDocument().getMIMEEntity();
if (mime != null) {
	// If multipart MIME entity
	if (mime.getContentType().equals("multipart")) {
		// Print preamble
		if (!mime.getPreamble().equals("")) {
			requestScope.status = "Preamble:\t" + mime.getPreamble() + "\n";
		}
		// Print content of each child entity
		var child1:NotesMIMEEntity = mime.getFirstChildEntity();
		while (child1 != null) {
			requestScope.status += 
			child1.getBoundaryStart() + child1.getContentAsText() +
			child1.getBoundaryEnd() + "\n";
			var child2:NotesMIMEEntity = child1.getFirstChildEntity();
			if (child2 == null) {
				child2 = child1.getNextSibling();
				if (child2 == null) {
					child2 = child1.getParentEntity();
					if (child2 != null) {
						child2 = child2.getNextSibling();
					}
				}
			}
			child1 = child2;
		}
	}
	// If not multipart, just print content
	else {
		requestScope.status = mime.getContentAsText();
	}
} else {
	requestScope.status = "Not MIME";
}
// Restore conversion
session.setConvertMIME(true);