GettyImages-606021900
Picture of iPhone 7 for illustration. Getty

A Georgia high school coach quit his job this week after it was discovered he had sent an inappropriate text message to a male student.

Miles Martin worked as the baseball and football coach at Cambridge High School in Milton, Georgia, a city located about 30 miles north of Atlanta. He claimed that the text message was intended for a friend with the same name as the student. A different student photographed the text, and posted it on Snapchat and then sent it to friends, according to the Atlanta Journal-Constitution.

"I made an error when sending a personal and private message to a trusted friend; to be clear it was an error and not an error in judgment that resulted in the message being delivered to a student. I immediately communicated my error to the individual and he acknowledged that the message wasn't meant for him," Martin wrote in a statement Wednesday to WSB-TV, an ABC affiliate in Atlanta.

Fulton County School spokeswoman, Donna Lowry, told WSB-TV that it was Martin's decision to quit. Martin claimed that even though he cooperated with the school, he had to resign in order to avoid a long and expensive investigation.

Fulton County School district officials said Martin's text was a rules violation.

"I made an error, I did nothing wrong, yet I saw no path to a fair decision without it taking months and costing thousands of dollars so I made the personal decision to resign my position, a position I dearly love," Martin wrote.

The family of the student had already forgiven Martin for his mistake Wednesday.

"We can all agree that Coach Martin never intended to send this to our son. My wife and I do not feel this text shows the type of person Coach Martin is and that his mistake should not affect his ability to coach and teach our boys," the family wrote in a letter to WSB-TV.

The specific content of the text messages has not been released.