A Massachusetts child-care worker accused of sending threatening letters to Donald Trump Jr. and other high-profile people will plead guilty to charges.

Daniel Frisiello, 25, agreed Friday to plead guilty to 13 counts of mailing a threat to injure the person of another and six counts of false information and hoaxes, according to the U.S. Attorney's Office in Massachusetts.

Frisiello's plea comes nearly seven months after a suspicious letter, which was addressed to the president's son, was opened by Trump Jr.'s then-wife, Vanessa Trump, inside their Manhattan apartment. It contained a white powder.

Daniel Frisiello was charged with sending white powder hoax letters to Donald Trump Jr. and others.

Vanessa Trump was sent to the hospital as a precaution after opening the envelope, although the New York Police Department later deemed the substance inside the envelope to be nonhazardous. Multiple senior law enforcement officials told NBC News that it appeared to be cornstarch.

A note inside read: "You are an awful, awful person. I am surprised that your father lets you speak on TV." It added: "You the family idiot. Eric looks smart. This is the reason why people hate you. You are getting what you deserve. So shut the f*** up."

The threatening letter was one of multiple that Frisiello was accused of sending. Six included white powder and were mailed to high-profile people, including actor Antonio Sabato Jr. and a California prosecutor. Another seven letters were sent to law enforcement officials and others, officials said.

While there was no return address on the envelopes, investigators said they were able to identify Frisiello as a suspect after he also ordered a "glitter bomb" from an online store for one of the recipients, using his real name.

Frisiello was suspended from his job at Catholic Charities' Peabody Child Care Center amid the investigation, the FBI said.