It seems like the "Undelete" method doesn't do what it says on the tin.
In short, I made a quick test where i call "ListMessages", loop through these, and fetch the individual messages.
While listing the fetched messages, I deleted one of them.
When fetching all messages once more, the count was reduced by 1, as expected.
Then I did an "Undelete", and finally fetched all the messages once more. Still the original count was reduced by 1.
When running the test once more, without the "Delete"/"undelete" code, my message seems to be permanently gone.
I've attached the code (the delete/undelete is currently commented out).
In short, I made a quick test where i call "ListMessages", loop through these, and fetch the individual messages.
While listing the fetched messages, I deleted one of them.
When fetching all messages once more, the count was reduced by 1, as expected.
Then I did an "Undelete", and finally fetched all the messages once more. Still the original count was reduced by 1.
When running the test once more, without the "Delete"/"undelete" code, my message seems to be permanently gone.
I've attached the code (the delete/undelete is currently commented out).