Authorities said he picked a random phone number to find the girl.
When she got the messages, she took the phone to her parents.
The girl's mother, who's identity has not been released to protect her daughter, kept communicating with Yoder until police set up the sting operation.
The woman credits her daughter for the arrest.
"She is the hero in all of this. Had she not have done the right thing and brought the phone to us, it would never have went to the point that it went to and he would be on the street," said the Connersville mother.
Police arrested Yoder as he rolled up in a horse-drawn buggy.