Problems with erection can be due to psychological factors like performance anxiety, inhibitions against sex and due to physical factors like neurologic defects, diabetes, inadequate blood flow to the penis, and also to certain hormonal problems. Certain tests like monitoring for nocturnal erections and measuring the blood flow through the penis may need to be carried out. A successful alternative that has come up is collections of sperms by masturbation which later be used for artificial insemination. Another problem with ejaculation that some men face is that the semen goes backwards into the urinary bladder instead of being ejaculated through the penis. This can occur in men who have had spinal injury or the ones suffering from diabetes, causing improper contraction of urinary bladder sphincter muscle.
Mumps can lead to complications like testicular inflammation.
Infections can damage the male reproductive tract leading to duct obstruction in some cases and decreased sperm production in others. These have to be treated by antibiotics and semen culture can tell whether infection is controlled or not. These habits should be discontinued. Other medication such as antihypertensives should also be reviewed in the light of effect on sperm count. Men should wear loose fitting underwear and cool clothes and avoid high temperature baths like saunas etc.