YORK -- Pop-up messages might be an annoyance for most computer users, but in at least once case, police in York County are thankful for them.

A Conewago Township man is facing jail time after turning himself in to police when a spam message told him he had been caught looking at child pornography.

And, coincidentally, he had been.

Edward L. Simmons, 43, was sentenced Tuesday by York County Judge Gregory M. Snyder to 6 to 23 months in York County Prison on one count of possession of child pornography. He had pleaded guilty to the third-degree felony charge on Dec. 18.

Edward L. Simmons, 43, was sentenced in York County Court Tuesday to 6 to 23 months behind bars on one count of possession of child pornography. He turned himself in after a pop-up spam message told him he had been caught looking at the illegal images.

According to charging documents filed by Detective Mark Baker of the Northern York County Regional Police Department, the incident and investigation occurred like this:

On April 11, Simmons went to the police department's headquarters and told them he was online two days prior when a pop-up message purportedly from the U.S. Department of Justice appeared on his screen, informing him he had been caught looking at child pornography.

Simmons went on to tell police the message said he needed to pay a fine in order to use his computer again. Finding no way to circumvent the pop up, Simmons bought a prepaid card, but he wasn't able to use this card to pay the "fine."

So he went to the police and asked for guidance on how to pay his fine so he could once again use computer.

He did admit that he had been viewing child pornography for about two years before he was "caught" by the "department of justice." He gave police permission to search his computer, as well as a trash can outside of his home where he said he stashed images he intended to burn.

Police found the garbage can was full of photos showing naked children. Police also found CDs and a thumb drive, which along with his computer, contained more than 6,000 images deemed to be child pornography.