private void SendMailToCustomer(Rma rma) { string subjectText = String.Empty; string bodyText = String.Empty; bool isSend = false; if (rma.RequestStatus.Equals(Rma.RmaStatus.Returned.ToString())) { EmailTemplateTextVariable.ReplaceRMAApprovalText(rma, out subjectText, out bodyText); isSend = true; } else if (rma.RequestStatus.Equals(Rma.RmaStatus.Rejected.ToString())) { EmailTemplateTextVariable.ReplaceRMARejectedText(rma, out subjectText, out bodyText); isSend = true; } if (isSend) { Store store = DataAccessContext.StoreRepository.GetOne(rma.StoreID); string companyEmail = DataAccessContext.Configurations.GetValue("CompanyEmail", store); WebUtilities.SendHtmlMail( companyEmail, rma.GetCustomer.Email, subjectText, bodyText, store); } }
private void SendMailToCustomer(Rma rma) { string subjectText = String.Empty; string bodyText = String.Empty; EmailTemplateTextVariable.ReplaceRMAApprovalText(rma, out subjectText, out bodyText); Store store = DataAccessContext.StoreRepository.GetOne(rma.StoreID); string companyEmail = DataAccessContext.Configurations.GetValue("CompanyEmail", store); WebUtilities.SendHtmlMail( companyEmail, rma.GetCustomer.Email, subjectText, bodyText, store); }