RAPID CITY, S.D. -

A former elementary school custodian in Rapid City who pleaded guilty to enticing teenage girls to email him explicit photographs has lost an appeal to the 8th U.S. Circuit Court of Appeals.

The appellate court recently affirmed Casey Godfrey's 20-year-sentence on his conviction last year for enticing a minor via the internet. The court rejected his argument that the sentence was "unreasonable."

Authorities say that between July 2013 and January 2014, Godfrey used the Internet to entice two teenage girls to email him explicit photographs. At the time of his arrest, he was working as a janitor at Pinedale Elementary School in Rapid City.