Add debug log for when messages are sent

This prints the entire email to the log when they are sent. Obviously,
this could be a security issue so it only happens when debugging is
enabled (which it should not be in a production system).

This is the first part in solving #1.