A Massachusetts man who sent threatening letters filled with white powder to President Trump’s sons and a Democratic U.S. senator was sentenced to probation Friday.

Daniel Frisiello, 25, of Beverly, was sentenced to five years of probation, with one year to serve in home detention with location monitoring and restitution, law enforcement sources told Fox News.

Frisiello pleaded guilty in October 2018 to 13 counts of mailing a threat to injure the person and six counts of false information and hoaxes.

He was arrested early last year after sending a letter filled with white powder to Donald Trump Jr in February 2018.

This booking photo released Thursday, March 1, 2018, by the Beverly Police Department shows Daniel Frisiello, of Beverly, Mass., accused of mailing five envelopes containing a white powder. Prosecutors are seeking three years in prison for Frisiello who admitted to sending threatening letters filled with white powder to President Donald Trump’s sons and others. Frisiello is set to be sentenced Friday, April 19, 2019, in Boston federal court.

This booking photo released Thursday, March 1, 2018, by the Beverly Police Department shows Daniel Frisiello, of Beverly, Mass., accused of mailing five envelopes containing a white powder. Prosecutors are seeking three years in prison for Frisiello who admitted to sending threatening letters filled with white powder to President Donald Trump’s sons and others. Frisiello is set to be sentenced Friday, April 19, 2019, in Boston federal court. (Beverly Police Dept via AP)

Trump Jr.’s now-ex-wife, Vanessa Trump, opened the letter and was briefly hospitalized after being exposed to the powder. Vanessa reportedly began coughing and feeling nauseous, however, she was soon cleared by doctors and the substance in the letter was found to be cornstarch.

LETTER WITH WHITE POWDER FOR TRUMP JR. CALLS HIM 'AWFUL,' SAYS HE'LL GET WHAT HE 'DESERVES'

Authorities said the letter included a threatening note that read: “You are an awful, awful person. I am surprised that your father lets you speak on TV. You are the family idiot, Eric looks smart.”

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

Other recipients included President Trump’s other son, Eric Trump, actor Antonio Sabato Jr. and Democratic U.S. Sen. Debbie Stabenow of Michigan.

Officials said they were able to track Frisiello down after examining a “glitter bomb” he allegedly sent to Michelle Dauber, a Stanford University law professor who supported an effort to recall a judge who made headlines when he sentenced a college student six months for sexual assault.

DONALD TRUMP JR. HITS NEWSWEEK, SUGGESTS MILLIONS OF ITS TWITTER FOLLOWERS ARE FAKE

Authorities said the font used in the letter sent to Dauber matched the lettering in the notes filled with white powder.

On Friday, Federal Judge Nathaniel Gorton said he declined to send Frisiello to prison because of concerns the 25-year-old would not respond well to incarceration. Frisiello's lawyer has said the man is developmentally disabled. But Groton stressed the sentence wasn't "lenient"

Frisiello thanked Groton and said the past year has been "hell" for his family. Prosecutors objected to the sentence.

CLICK HERE FOR THE FOX NEWS APP

During the period of probation, Frisiello is prohibited from contacting victims in the case, sending letters through the mail, accessing the internet, and possessing and accessing computers.

The Associated Press contributed to this report.