Added functionality for more automated emails