Personal tools

Sep 10, 2010

"Received" field is big trouble for Lotusscript..

Filed Under:

A bit of background when SMTP mail headers come in, they create multiple 'received' fields in mail document

This is done instead of putting multiple entries in a single field,  but the problem comes from the fact that the notes mail document includes a 'Received' field for every server it has passed. 

Lotus Notes give us a documented method that gets the text values of the Received items in a mail document.

stringArray = notesDocument.GetReceivedItemText( )


But sometimes it doesn't work...

Agent message: Received Item is not standard format - access with GetItemValue


Thanks to Raymond Neeves for his great function

After calling this, you can simply access all values of Received field with

Forall v In doc.Received
    msgbox v
End Forall