Send email transcript Encompass coding

Here is a small sendemail transcript function and explanation for Encompass private void SaveEmailTranscript(EmailTemplate template, List<EmailAttachment> atts) { StringBuilder stringBuilder = new StringBuilder(); List<string> values = new List<string>(); values.AddRange((IEnumerable<string>) template.ToAddresses.GetAddresses(template)); values.AddRange((IEnumerable<string>) template.CCAddresses.GetAddresses(template)); values.AddRange((IEnumerable<string>) template.BCCAddresses.GetAddresses(template)); stringBuilder.AppendLine(“From: ” + EncompassApplication.CurrentUser.FullName + “<” + EncompassApplication.CurrentUser.Email + “>”); stringBuilder.AppendLine(“Sent: ” + DateTime.Now.ToString(“MM/dd/yyyy hh:mm:ss tt”)); stringBuilder.AppendLine(“To: ” + string.Join(“; “, …

Encompass plugin sendemail code snippets – only few blocks not complete

Here is a code snippet of send email for one of the encompass plugin public void SendEmail(EmailTemplate template) { try { // ISSUE: reference to a compiler-generated field if (Main.\u003C\u003Eo__38.\u003C\u003Ep__0 == null) { // ISSUE: reference to a compiler-generated field Main.\u003C\u003Eo__38.\u003C\u003Ep__0 = CallSite<Func<CallSite, object, MailItem>>.Create(Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (MailItem), typeof (Main))); } MailItem message = Main.\u003C\u003Eo__38.\u003C\u003Ep__0.Target((CallSite) Main.\u003C\u003Eo__38.\u003C\u003Ep__0, …

Explanation of some code in Encompass plugin

Here are some snippets from the plugin to move attachments to a folder foreach (Attachment attachment in currentLoan.Attachments) { List<string> stringList = new List<string>(); try { string str1 = docTitle; char[] chArray = new char[1]{ ‘,’ }; foreach (string str2 in str1.Split(chArray)) stringList.Add(str2); } catch { stringList.Add(docTitle); } foreach (string str in stringList) { if …