added option to prevent emails to be sent out.