Histoplasmosis is caused by a fungus that infects the lungs and causes pneumonia. Infection occurs when spores from the fungus are breathed in. The spore-forming organism grows best at temperatures between 50 and 90 degrees Fahrenheit. It can also grow in soil with moisture available all year round, such as near bodies of water or underground. Infected individuals produce antibodies that help fight off future infections. Without treatment, histoplasmosis can be fatal. Diagnosing histoplasmosis requires testing specimens from the lungs using microscopy or DNA sequencing. Treatment involves fungal medications that kill both fungi and bacteria. It may not work on viruses so there is no cure for histoplasmosis but it can be controlled with medication.