added hostname variable to email templates