I’ve been tracking down an interesting issue for the past couple of weeks. I guess I’m losing my touch, because after finding the problem, I’m pounding my head against the wall to get some intelligence back in there. So here’s the whole story.
Seems that messages are routed from the mail.box into a particular mail file, then a process moves them into the ($Inbox) folder. The client sees this as the magic of the message being delivered to the Inbox. Each mail file can have one (and only one) agent with the trigger of “Before New mail arrives.” I believe the agent triggers after the message is in the file (consider being in the All Documents view) and before it’s moved into the Inbox. I don’t know that I have hard evidence of that, just a strong feeling. But I digress.
The process that moves the message into the Inbox (some would say that’s the router), appears to look for a field named “$Name” with a value of ($Inbox) on a Note. Now I should take a side trip here, to mention/remind that all entities in a Notes database are notes. Some are design notes, some profile documents, and others regular documents. It seems that when a document gets created with such a field, the process gets confused and will produce the message “Attempt to perform a folder operation on a non-folder note.” I started looking for the issue when the router refused to deliver messages to this mail box, but I also have now seen this where it will deliver, but not place in the inbox.
So, nearly thirty days with an issue open, and I get instructed to use NotesPeek to search under the covers. Doh! I could have saved a whole bunch of time and effort, but didn’t even cross my mind to use NotesPeek. (ARGGgggg).
So to bring a terribly long story to a close. If you get the message “Attempt to perform a folder operation on a non-folder note.” you might want to use NotesPeek to identify all the documents with a $Name field with the value of ($Inbox). Remove all but the real inbox. Create a temporary folder, and move all the Inbox documents there. Delete the real inbox since it’s probably “hosed” anyway. Next, refresh the design so a new inbox comes into the mail file. Move all the inbox documents back, and test.