Ejemplo n.º 1
0
        public async Task <HttpStatusCode> SendEmailHelper(object item, Email datamodel)
        {
            IEmailProvider emailProdvider = EmailFactory.getEmailInstance((EmailEnum)Enum.Parse(typeof(EmailEnum), item.ToString()));

            responseMessage = await emailProdvider.SendEmailAsync(datamodel);

            if (responseMessage.StatusCode != System.Net.HttpStatusCode.OK)
            {
                throw new Exception(responseData);
            }
            else
            {
                return(HttpStatusCode.OK);
            }
        }