On the production of low-energy cosmic-ray electrons