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?
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.