Canniff, 31, was arraigned Tuesday on misdemeanor charges of endangering the welfare of a child. State Police said he sent the texts in June to a 16-year-old Watervliet girl. He also sent her a picture of himself in his underwear, police said.

Canniff pleaded not guilty to the charges in Watervliet City Court.

Schalmont officials did not return several calls for comment.

Watervliet Superintendent Lori Caplan said Canniff, who lives in Schenectady, came to her office on Aug. 27 to say he was resigning.

The State Police complaint filed against Canniff was dated that same day.

"He said he was leaving us and thanked me for his six years here," Caplan said. "He did not give a reason for his departure."

She refused to comment on whether district officials at that time knew of the teacher's impending arrest.

Canniff, who taught Earth science and was a baseball coach in Watervliet, was released after his appearance and due back in city court Sept. 22.

Watervliet police officer Joshua Spratt, a school resource officer, was arrested July 31 on charges accusing him of sexual contact with two female students ages 16 and 17. Albany County sheriff's Sgt. Martin F. Zaloga Jr. resigned last month amid an investigation of allegations he sent inappropriate texts to a teenage girl in the Watervliet district.