Added logging and mailing functionality to the templates
using NLog and mailzor.