Add an optional send mail flag to allow disabling of email sending

Required change for a proposed pull request in social stream base