added option for automatic emails