ContentType (NotesMIMEEntity - JavaScript)

Read-only. The first part of the Content-Type of a MIME entity.

Defined in

NotesMIMEEntity

Syntax

getContentType() : string

Usage

The content type classifies the data in the body of a MIME entity. The defined content types are text, multipart, message, application, audio, image, and video. For example, if the MIME Content-Type is image/gif, the this property is image.

Examples

This button gets the MIME content from the current document.
var doc:NotesDocument = currentDocument.getDocument();
var mime:NotesMIMEEntity = doc.getMIMEEntity();
if (mime != null) {
	var m:string = "Content type: " + mime.getContentType() + "\n" +
	"Content subtype: " + mime.getContentSubType() + "\n" +
	"Character set: " + mime.getCharset() + "\n" +
	"Encoding: " + mime.getEncoding();
	requestScope.status = doc.getItemValueString("Subject") + "\n" + m + "\n" +
	mime.getHeaders() + "\n" + mime.getContentAsText();
} else {
	requestScope.status = "Not MIME - " + doc.getItemValueString("Subject");
}