A former New Jersey teacher admitted in court to using a school email address to send a student X-rated messages, according to officials.

Michelina Aichele, 30, entered the plea on child endangerment charges Wednesday in Somerset County Superior Court in Somerville, NJ.com reported.

The former Montgomery Township High School teacher is accused of sending nude photos and explicit messages to a student between February and April 2018.

Police said they interviewed the student, who admitted the English teacher sent him four nude pics on Snapchat when he was a junior.

“He further stated that she sent him text messages through Snapchat, stating that she thought about him while masturbating,” authorities said.

Aichele initially denied the relationship claiming students hacked her phone then sent themselves her nude snaps, officials said.

But authorities later discovered the teacher used her school email address to send the student racy messages and asked him to take the “Rice Purity Test,” which measures a person’s level of sexual experience, according to NJ.com.

Prosecutors recommended Wednesday that Aichele serve a year in county jail. Her sentencing is set for July.

Aichele was ordered to register as a sex offender and must surrender her teaching license.

With Wires