Add a utility to capture messages to log.

This adds a simple utility to log the message instead of contacting accounts. I did this mostly for development purposes. In a development environment, it is unlikely that you have an smtp setup and/or have given unique email addresses to your users.