Among the letters sent by Daniel Frisiello, 25, was one addressed to Donald Trump Jr. that was opened in February by his now-estranged wife, Vanessa. She called 911 and was briefly hospitalized after she reported she was coughing and felt nauseous. The substances in all of the letters turned out to be nonhazardous.

Frisiello, who wore a dark suit, looked down in front of him and put his hand to his mouth as the prosecutor read to the court some of Frisiello’s letters filled with profanity and slurs.

Assistant U.S. Attorney Scott Garland said Frisiello was a “prolific letter writer” who wrote to public figures and celebrities to share his ideas and request autographs. But he also had a “darker side,” Garland said.

Frisiello’s attorney, William Fick, declined to comment after the hearing. Fick told the judge that Frisiello has substantial cognitive and developmental issues from brain damage he suffered at birth. He said Frisiello is profoundly autistic and has an anxiety disorder.

Frisiello, who has been out of jail since March, was allowed Wednesday to return to his home, where he’s been confined with certain restrictions. He’s prohibited from sending anything in the mail. He’ll be sentenced in January and has agreed not to appeal his sentence if it’s 7 1/4 years or less.

Frisiello also sent a white powder letter to Eric Trump during the 2016 presidential campaign that said his father must drop out of the race or the next letter wouldn’t be fake, Garland said.

Other recipients included Debbie Stabenow, the Democratic U.S. senator from Michigan; Michelle Dauber, a Stanford University law professor who promoted an effort to recall California judge Aaron Persky; and Antonio Sabato Jr., a Republican former underwear model and soap opera actor who’s running for Congress in California.

Frisiello also sent menacing letters to law enforcement in New England warning them to drop an investigation into Nathan Carman, a Vermont man accused by relatives of killing his millionaire grandfather and his mother to collect inheritance money, Garland said. In another letter, he threatened to shoot the assistant district attorney who prosecuted Michelle Carter, a Massachusetts woman who sent her boyfriend dozens of text messages urging him to take his own life, Garland said.

The letter he sent to Donald Trump Jr. included a message that said: “You make the family idiot, Eric, look smart.”

“This is the reason why people hate you, so you are getting what you deserve,” the message said.