NotesMIMEEntity (LotusScript®)
Represents the MIME (Multipurpose Internet Mail Extensions) content of a document.
Containment
Contained by: NotesItem, NotesDocument
Contains: NotesMIMEHeader
Properties
Methods
Access
To access the MIME content of a NotesDocument:
- First set NotesSession.ConvertMIME to False to override normal conversion of MIME items to rich text.
- Then call NotesDocument.GetMIMEEntity.
- Or call NotesDocument.GetFirstItem followed by NotesItem.GetMIMEEntity.
- To create an item in MIME format, call NotesDocument.CreateMIMEEntity.
- Before exiting your code, set NotesSession.ConvertMIME back to True (or the original setting).
Usage
A valid NotesMIMEEntity object becomes invalid if any of the following methods are applied to the containing NotesDocument object: ComputeWithForm, Encrypt, Save, Send, or Sign, or CloseMIMEEntities in NotesDocument.
Avoid processing items as both NotesItem and NotesMIMEEntity objects concurrently. Once you start using NotesMIMEEntity properties and methods, do not use other methods that access items in the same document until you terminate MIME processing with ComputeWithForm, Encrypt, Save, Send, or Sign, or CloseMIMEEntities in NotesDocument.
An item named $NoteHasNativeMIME with a value of "1" indicates that the document contains a MIME entity. An item of type "MIME part" contains the body of the MIME entity; in mail messages this is typically the item named "Body." For a multipart MIME entity, the document has multiple "MIME part" items, one for each parent and child entity. The "MIME part" item contains headers such as "Content-Type" and "Content-Transfer-Encoding," the preamble (parent entities), and body content (child and stand-alone entities). In a mail message, certain items correspond to MIME headers, for example, Subject ("Subject" header), SendTo ("To" header), and Received ("Received" header).
The NotesMIMEEntity and NotesMIMEHeader classes collect and organize the MIME information from a document. One NotesMIMEEntity object represents a document containing a MIME entity that is not multipart. Multiple NotesMIMEEntity objects represent a document containing a MIME entity that is multipart. A multipart MIME entity consists of multiple parent and child entities. A child entity can also be a parent.