Generation of intense infrared radiation from an electron beam propagating through a rippled magnetic field