smtp and mongo enhancements