Esempio n. 1
0
        public ActionResult EmailRing(EmailRingModel model)
        {
            try
            {
                var builder  = new EmailRingEmailTemplateViewModelBuilder(model, jewelRepository, mapper);
                var template = builder.Build();
                mailer.EmailRing(model.FriendEmail, template).Send();
                return(Json(new OporationWithoutReturnValueJsonModel()));
            }
            catch (Exception ex)
            {
                var viewModel = new OporationWithoutReturnValueJsonModel();
                viewModel.HasError     = true;
                viewModel.ErrorMessage = ex.Message;

                return(Json(viewModel));
            }
        }