*8212* Mail template refactoring for PKP lib