public async Task <JsonResult> SaveProposalInfo(SendProposalViewModel viewModel)
        {
            var postedFileWithoutExtension = Path.GetFileNameWithoutExtension(viewModel.Attachment.FileName);

            viewModel.Proposal_File = Utilities.SaveImage(Server, viewModel.Attachment, postedFileWithoutExtension, Constant.FILE_PATH_FOR_LEADS_PROPOSAL);
            tbl_crm_leads updateLead = Mapper.Map <SendProposalViewModel, tbl_crm_leads>(viewModel);

            ResponseMessage responseMessage = await leadsManager.SaveProposalInfoAsync(updateLead).ConfigureAwait(false);

            if (responseMessage.Type == Constant.RESPONSE_MESSAGE_TYPE_SUCCESS)
            {
                var root     = Server.MapPath(Constant.FILE_PATH_FOR_LEADS_PROPOSAL);
                var fileName = viewModel.Proposal_File;
                var path     = Path.Combine(root, fileName);
                path = Path.GetFullPath(path);

                var message = new MailMessage();
                message.To.Add(new MailAddress(viewModel.To));                                            // replace with valid value
                message.From    = new MailAddress(ConfigurationManager.AppSettings["CRM_EMAIL_ADDRESS"]); // replace with valid value
                message.Subject = viewModel.Subject;
                message.Body    = viewModel.Message;
                Attachment attachment = new Attachment(path, MediaTypeNames.Application.Octet);
                System.Net.Mime.ContentDisposition disposition = attachment.ContentDisposition;
                message.Attachments.Add(attachment);

                message.IsBodyHtml = true;

                using (var smtp = new SmtpClient())
                {
                    var credential = new NetworkCredential
                    {
                        UserName = ConfigurationManager.AppSettings["CRM_EMAIL_ADDRESS"],  // replace with valid value
                        Password = ConfigurationManager.AppSettings["CRM_EMAIL_PASSWORD"]  // replace with valid value
                    };
                    smtp.Credentials = credential;
                    smtp.Host        = "smtp.gmail.com";
                    smtp.Port        = 587;
                    smtp.EnableSsl   = true;
                    await smtp.SendMailAsync(message);
                }

                return(new JsonResult {
                    Data = new { status = true }
                });
            }
            else
            {
                return(new JsonResult {
                    Data = new { status = false }
                });
            }
        }