3.0 Cannot mock mail transport

Fix for #3453