private void SendEmailToMarketing() { string strFromEmail = ""; string strToEmail = ""; List <string> strToEmails = new List <string>(); List <string> strCCEmails = new List <string>(); strFromEmail = GetEmail(GetEmpId(frmHome.EmpName.ToString().Trim())); // strFromEmail = GetE(); strToEmails = GetMarketingEmails(); StringBuilder strBuliderEmailSubject = new StringBuilder(); strBuliderEmailSubject.Append("New Customer Introduced"); StringBuilder strBuliderEmailBody = new StringBuilder(); strBuliderEmailBody.Append("<head>"); strBuliderEmailBody.Append("<title>"); strBuliderEmailBody.Append(Guid.NewGuid().ToString()); strBuliderEmailBody.Append("</title>"); strBuliderEmailBody.Append("</head>"); strBuliderEmailBody.Append("<body>"); strBuliderEmailBody.Append("<br>"); strBuliderEmailBody.Append("<br>"); strBuliderEmailBody.Append("Dear Sir/Madam,"); strBuliderEmailBody.Append("<br>"); strBuliderEmailBody.Append("<br>"); strBuliderEmailBody.Append("<b><u><FONT COLOR=DodgerBlue>New</FONT></u></b> Customer Entered"); strBuliderEmailBody.Append("<br>"); strBuliderEmailBody.Append("<br>"); strBuliderEmailBody.Append(" <b>Customer : </b>" + txtCusName.Text.Trim() + ""); strBuliderEmailBody.Append("<br>"); strBuliderEmailBody.Append(" <b>Location : </b>" + txtLocation.Text.Trim() + ""); strBuliderEmailBody.Append("<br>"); strBuliderEmailBody.Append(" <b>Contact Person : </b>" + txtContactPerson.Text.Trim() + ""); strBuliderEmailBody.Append("<br>"); strBuliderEmailBody.Append(" <b>Contact No : </b>" + txtContactNo.Text.Trim() + ""); strBuliderEmailBody.Append("<br>"); strBuliderEmailBody.Append("<br>"); strBuliderEmailBody.Append("Regards,"); strBuliderEmailBody.Append("<br>"); strBuliderEmailBody.Append("<br>"); strBuliderEmailBody.Append("" + frmHome.EmpName + ""); strBuliderEmailBody.Append("<br>"); strBuliderEmailBody.Append("<br>"); strBuliderEmailBody.Append("<FONT COLOR=darkred>Auto generated email from CRM system</FONT>"); strBuliderEmailBody.Append("<br>"); strBuliderEmailBody.Append("</body>"); strBuliderEmailBody.Append("</html>"); EmailServices Email = new EmailServices(); Email.SendEmailsToMulti(strFromEmail.Trim(), strToEmails, strBuliderEmailSubject.ToString(), strBuliderEmailBody.ToString()); }