added "send an email on a new message" functionality