protected virtual EmailNotifyResponse NotifyMail(EmailNotifyRequest request)
        {
            var result = new EmailNotifyResponse();

            if (request != null)
            {
                BackgroundJob.Enqueue(() => NotifyByEmail(request));
                result.Succeeded();
            }
            else
            {
                result.Status = "NoRequest";
            }

            return(result);
        }
Exemplo n.º 2
0
        protected virtual EmailNotifyResponse NotifyMail(EmailNotifyRequest request)
        {
            var result = new EmailNotifyResponse();

            if (request != null)
            {
                try
                {
                    MailService.Send(request.Email, request.Subject, request.Body, request.IsHtml, null, null);
                    result.Succeeded();
                }
                catch (Exception e)
                {
                    result.Failed(e);
                }
            }
            else
            {
                result.Status = "NoRequest";
            }

            return(result);
        }