No. You do not need to file by mail.
Generally, a Form 1099-R must be attached to a tax return filed by mail if the 1099-R shows withholding of federal income tax. However, if the tax return is e-filed, there is no requirement to mail the Form 1099-R.