Fix issue with loading the emailtemplate and sending the email