A 40-year-old Saugus mom is facing four years behind bars after she pleaded guilty yesterday to raping two teenage boys on separate occasions.

Heather Salines pleaded guilty to two counts of child rape, two counts of child enticement, two counts of dissemination of obscene matter to a minor and one count of indecent assault and battery on a person over 14 yesterday in Essex Superior Court in Salem.

Judge Mary K. Ames sentenced her to four years in prison followed by three years probation, and ordered her to have no unsupervised contact with children under 16 and to register as a sex offender when she’s released from prison.

“These actions are beyond despicable,” said Essex District Attorney Jonathan Blodgett. “This defendant took advantage of her position as a trusted adult and betrayed that trust in a most vile way.”

Prosecutors said they could have proven that in February 2014 Salines coaxed a 14-year-boy, who was staying in her home, into her room where she sexually assaulted him. After he left, prosecutors said she bombarded his phone with lewd text messages including naked pictures.

A month later, she began text messaging a second teenage boy, whom she arranged a rendezvous with at a nearby hotel, where she sexually assaulted him, prosecutors said.

Police were alerted to Salines’ actions when officials at the Belmonte Middle School in Saugus learned of the explicit images of the defendant on the victim’s phone, prosecutors said.