fix pattern/replacem in mail templ