How ED may be treated depends on the cause. If it is caused by a disease, sometimes treating the disease will reduce the problem. For example, if a man is unable to have erections because his body does not make enough testosterone, he can be given pills to take which help his body to do so. If the blood vessels or nerves in the corpora cavernosa penis are damaged, a full cure may not be possible. However, there are some temporary treatments that allow a man to have an erection for long enough to have sex: