Reputation: 53
The Body field of Notes mail document in the database does not contain the actual email text at all, but just contains the HTML elements.
However, the actual email text is seen when this Notes mail document is opened in the browser.
We are using the below code snippet to fetch the email text:
Set nrtNotesRichTextItem=ndocEmailDocument.GetFirstItem ("Body")
strEmail = strEmail + "<br>" + nrtNotesRichTextItem.GetUnformattedText
As the Body field does not contain the actual email text, the variable strEmail is not returning the text, but returning the hyperlink text which when is clicked, redirects to a web page that contains the actual email text that we need.
Any leads on this?
Upvotes: 1
Views: 727
Reputation: 11
You probably have a multi-value Body. (Confirm by looking at the items in the properties of the document: Alt+Enter, second tab, scroll in the left pane to find "Body" and see how many times it occurs.)
Try accessing the rest using v
in something like the below:
Forall v In nrtNotesRichTextItem.Values
End Forall
Upvotes: 1
Reputation: 14628
Based on what you have described in comments, you are dealing with a large MIME message. Do you see just the actual text in View -> Show Page Source? Or do you see MIME headers, dividers, tags, and text? This is the crucial question.
Notes provides a GetMIMEEntity method in the NotesDocument class and it provides the NotesMIMEEntity class with various methods to traverse the structure of a MIME message and extract its content.
Upvotes: 0