public ActionResult Index(string customerId, string message = null, string subject = null) { if (string.IsNullOrEmpty(message)) { message = ControllerConstants.defaultThankYouMessage; } if (string.IsNullOrEmpty(subject)) { subject = ControllerConstants.defaultThankYouSubject; } Customer user = _customerManagementService.GetCustomerbyId(customerId); ViewBag.FirstName = user.FirstName; MailAPI.SendMessage(user.Email, user.FirstName, message, subject); return(View()); }