Backend for templated-email app