Using Past perfect with the verb Forget would, I believe, sound better.
There are three different time dimensions in your sentence viz.
- When you ordered the book.
- When you found it in the mailbox.
- Present i.e. when you are narrating this story.
The activity that is affiliated to these time frames and which, hence, should describe the tense to be used is the verb Forget.
Narrating the story in the Present, you give a time reference of a Past event i.e. finding that book in the mailbox, and Earlier to this point of time, you say, that you ordered the book. What happened in the amidst was forgetting that
you ordered the book.
Therefore, as per my understanding, it should be:
I had forgotten,
- that I ordered the book
- until I found it in my mailbox.