added middleware to additional emails endpoints