The effect of resonances on collisional energy transfer