The idea that Joseph Smith might have used plant derived hallucinogens to help promote "spiritual" experiences among the early members of the Church is not new and has been discussed extensively on this board.
There is also a good write up on the Mormon Think website about this theory. Some of what follows is taken from my previous posts on this subject.
The source plant that seems to best accounts for the "pouring out of the spirit" effects reported among the early Saints is
Datura Stramonium (or Jimson weed). Datura effects are of the type, and more importantly the duration, described in several detailed accounts.
The active compounds in Datura are not strictly classified as hallucinogens. Datura contains the alkaloids atropine and scopolamine, which are better classified as *deliriants* in sufficient doses, and act mainly by blocking the action of the neurotransmitter acetylcholine in the nervous system. In small doses, scopolamine (usually administered through a skin patch) is useful in reducing the symptoms of motion sickness and atropine (injected) can protect against the effects of certain nerve agents used in chemical warfare.
There have also been a number of threads on DMT, and the intense religious experience that some experience after ingesting it. DMT is made by a number of plants, including
Phalaris arundinacea, and (thanks to evolution) the enzymatic machinery to make it is also found in the human body.
DMT (N, N, dimethyl tryptamine) can be a minor by-product along the biosynthetic pathway from the amino acid tryptophan to hormone melatonin in the human pineal gland (by way of the neurotransmitter serotonin).
Depending on the enzymes available, melatonin (5-methoxy tryptamine), can be further metabolized (via pinoline) to 5-methoxy dimethyl tryptamine and N,N, dimethyl tryptamine (DMT), both of which are psychoactive. DMT can also result from the shuttling of the intermediate tryptamine down a separate biosynthetic pathway in the pineal gland.
Below is a graphic (that has been posted on this board before) showing how DMT is related to the amino acid tryptophan and its metabolic products in the body, including the neurotransmitter serotonin and the hormone melatonin.
As is clear from the graphic, there are a number of psychoactive compounds that are variations on the theme of the basic tryptophan molecule, and especially its indole nucleus.
The metabolic products of tryptophan, and the wide variety of ways in which they are used by organisms up and down the phylogenetic scale (from algae to humans), is best explained by evolution. One would be hard pressed to find a better example of molecular evolution than that represented by the amino acid tryptophan and its many products.

As to the idea that Joseph Smith somehow found and used DMT to have his spiritual experiences, I have my doubts.
Joseph Smith was a consummate con man and liar. While I certainly believe that he would have gladly spiked the sacrament wine with Datura to make others believe that the spirit was among them, I don't believe he needed DMT, or any other drug (aside from alcohol, perhaps) to come up with his religious b*ll sh*t.