Mandelamine, containing the active ingredient methenamine, is used to prevent and control recurrent urinary tract infections (UTIs) caused by certain bacteria. It is not used to treat an active infection; antibiotics are required for that. Methenamine works by stopping the growth of bacteria in the urine, which helps in preventing infections.