A transient has pleaded guilty to sending an email to California Lutheran University this month threatening a campus shooting.

Thomas Pecel, 30, admitted the misdemeanor charge Wednesday in Ventura County Superior Court. In exchange, prosecutors dismissed a felony charge of making a criminal threat.

Pecel was placed on three years’ probation and ordered to start mental health counseling and have no contact with the Thousand Oaks university, said Deputy District Attorney Julia Snyder. He received credit for time spent in county jail since his arrest, she said.

Pecel sent the threatening email May 1. He was arrested by sheriff’s deputies May 7 at Harbor Community Church in Ventura, which provides meals and other services to homeless people.

After the arrest, CLU President Chris Kimball told the university in a statement: “There is no information to indicate that the person has the ability to carry out the threat. The person also has no direct connection with CLU; he is not a student nor an employee.”