Did you ever mistakenly toss something in the trash then realize what had been done once it was too late? Luckily for an Oregon man, his mistake came with a happy ending.

A man, whose name has not been released, threw a shoebox into a recycling bin last week. It wasn't just any empty box. In fact, it wasn't empty at all. The box held the man's life savings -- almost $23,000 in cash, The Press Democrat reported.

>> Read more trending news 

The man realized that he made a mistake, but it was too late as the bin already had been dumped in a truck and was on the way to a recycling center in California.

Against hope, he called Recology to alert them to his mistake.

The company processes trash from more than a million homes in Washington, Oregon and California.

The manager of one of the company's sorting locations told her crew to be on the lookout for the box, but didn't think it would ever be found.

But she was wrong.

>> Need something to lift your spirits? Read more uplifting news 

Friday morning, the box came through the sorting line and was recovered.

The box wasn't empty. It contained the cash, $22,940, that the man had stored in it.

"It only toppled out of the box once it got into the sorting line. We managed to recover all but $230,Brian Sollom, the operations manager for three Recology recycling facilities told the Press Democrat.

Sollom said they don't usually get that lucky when someone contacts them for an item that shouldn't have been tossed in the trash.

The recovery also brought the recycling crew together.

"Everyone who was on the sorting line was beaming this morning. And now this gentleman will get to have a great weekend," Linda Wise, the general manager of the recycling center, told the Press Democrat.

The man drove five hours from his home to claim his cash.