added changes to notify-by-email command