Ergot is a fungus that lives on rye and other grasses and is pathogenic to its host as well as to humans and other animals that ingest it. Ergot is also a great source for the art of healing and the pharmaceutical industry.
Like most great pharmacological resources,  ergot is a powerful poison. More specifically, many ergot alkaloids have a poisonous effect on the central nervous system, interfering heavily with neurotransmitter function. And here also lies the great promise of ergot as medicine.
Ergot is an old member of the materia medica. It has been used in traditional medicine and it has been scientifically studied for more than 50 years. Among those studying ergot and its derivatives was the Swiss chemist Albert Hofman whose experiments led to the discovery of LSD, an ergot derivative that strongly interferes with the neurotransmitter serotonin.
In the field of conventional medicine, ergot derivatives are nowadays mostly used for their potential to enhance another neurotransmitter, dopamine. A dopamine deficiency is a common grave medical condition, Parkinson's Disease.
While the ergot derivative LSD is used almost exclusively as recreational drug with practically no use in conventional medicine, dopamine enhancing ergot derivatives are sold in pharmacies around the world. The most common ergot prescription drug is probably Sandoz' Parlodel (bromocriptine by generic name). Even though it's very much a conventional medication, bromocriptine and other dopamine enhancing ergot derivatives have a clear potential as life-style drugs. Not all, but many ergot-based medications for Parkinson's Disease have a profound sexuality enhancing (side) effect.
All dopamine-enhancing medications can be used in the treatment of Parkinson's Disease, but not each and every dopamine enhancement produces pro-sexual (side) effects. On a similar level, while many medications used for serotonin enhancement (in the treatment of clinical depression) have anti-sexual effect, this anti-sexual effect is not an unavoidable side effect of serotonin enhancement.
The answer to the puzzle lies in dopamine and serotonin receptor sites. Not all dopamines and all serotonins are alike. The effect of some dopamine binding to specific sites is pro-sexual, and the binding of some other dopamines to other sites may be neutral at best, or even anti-sexual. The same holds true for serotonin enhancing drugs and serotonin binding sites.
Until now, many ergot derivatives are considered "dirty" drug. They are named like this because their action is not all too specific. They have the therapeutic effect for which they are prescribed, but they have many other effects, too. From the perspective of conventional medicine, the pro-sexual effects are a side effect.
1 Dale H. H., On some physiological actions of ergot, The Journal of Physiology Volume 34, Issue 3, pages 163–206, May 31, 1906
2 Yasushi Ohizumi, Application of Physiologically Active Substances Isolated from Natural Resources to Pharmacological Studies, The Japanese Journal of Pharmacology Vol. 73 (1997) No. 4 P 263-289
3 N R Farnsworth, The value of plants used in traditional medicine for drug discovery., Environ Health Perspect. 2001 Mar; 109(Suppl 1): 69–75.
4 D. B. Calne, Bromocriptine in Parkinsonism, BMJ 1974; doi: 10.1136/bmj.4.5942.442, Published 23 November 1974