decodeContent (NotesMIMEEntity - JavaScript™)
Decodes the non-header content of a MIME entity.
Defined in
NotesMIMEEntitySyntax
decodeContent() : void
Usage
This method decodes the non-header content of a MIME entity if the entity is encoded, and removes the Content-Transfer-Encoding header if one exists.Use getEncoding to get the current encoding.
Use encodeContent to set an entity's encoding.
Examples
This button changes the encoding for a one-part MIME entity toNone
. If the entity content
is already encoded (base64
or quoted-printable
),
the agent first decodes the entity.// Do not automatically convert MIME to rich text
session.setConvertMIME(false);
var doc:NotesDocument = currentDocument.getDocument();
var mime:NotesMIMEEntity = doc.getMIMEEntity();
if (mime != null) {
mime.decodeContent();
mime.encodeContent(NotesMIMEEntity.ENC_NONE);
doc.save(true, true);
} else {
requestScope.status = "Not MIME";
}
// Restore conversion
session.setConvertMIME(true);