A US Navy veteran has been charged with threatening to use a biological toxin as a weapon by sending letters to US president Donald Trump and other leaders containing ground castor beans.

William Clyde Allen III, 39, told investigators he wanted the letters to "send a message," though he did not elaborate, FBI investigators said in documents filed in US District Court of Utah.

Allen also said he sent similar letters to Queen Elizabeth II, Russian President Vladimir Putin and the secretary of the Air Force, though it is not clear whether those envelopes had been found.

Authorities traced Allen after finding his return address on the envelopes which contained the substance from which the poison ricin is derived, according to the complaint.

The envelopes that tested positive for ricin also had a note that said "Jack and the Missile Bean Stock Powder," the documents said.

US Attorney for Utah John Huber declined to comment on Allen's mental state, but said the case is "no laughing matter".

"When you're dealing with suspected ricin, this is nothing to trifle with," he said.