private void imageTextButtonSendErrorInfo_Click(object sender, EventArgs e) { var helpdeskMail = AdditionalInfo.SplitByTwoDifferentStrings("HelpdeskEmail:", ";", true)[0]; var userCode = AdditionalInfo.SplitByTwoDifferentStrings("UserCode:", ";", true)[0]; var appVersion = AdditionalInfo.SplitByTwoDifferentStrings("ApplicationVersion:", ";", true)[0]; var valueText = new ValueText { Value = ".NET Framework", Text = "" }; var listValueText = new List <ValueText>(); listValueText.Add(valueText); var installedNetFxes = SystemInfoHelper.GetInstalledSoftwareList(listValueText); var installedNetFxesStr = ""; for (int index = 0; index < installedNetFxes.Count; index++) { var installedSoftware = installedNetFxes[index]; if (index == 0) { installedNetFxesStr = installedSoftware.ProductName + " " + installedSoftware.VersionString; } else { installedNetFxesStr = installedNetFxesStr + "; " + installedSoftware.ProductName + " " + installedSoftware.VersionString; } } var body = "Dear Developer%0D%0A" + "%0D%0A" + "Following is system running error infomation for you:" + (userCode.IsNullOrEmpty() ? "" : " (send by " + userCode + ")") + "%0D%0A" + "Application Version : " + appVersion + "%0D%0A" + "Assembly Bits : " + IntPtr.Size * 8 + "%0D%0A" + "OS : " + SystemInfoHelper.GetSystemInfo("osinfo") + " " + SystemInfoHelper.GetSystemInfo("osbit") + " bits" + "%0D%0A" + "Machine Name: " + SystemInfoHelper.GetSystemInfo("machinename") + "%0D%0A" + "IP: " + SystemInfoHelper.GetSystemInfo("Ips") + "%0D%0A" + "Windows Account: " + SystemInfoHelper.GetSystemInfo("currentuser") + "%0D%0A" + "Occurring Time: " + OccurringTime + "%0D%0A" + "Installed dotNetFx: " + installedNetFxesStr + "%0D%0A" + "Exception Message: " + ExceptionMsg; body = body.Replace("\n", "%0D%0A"); var subject = ErrorText + " occured at " + OccurringTime; LocalEmailHelper.Send(helpdeskMail, subject, body); }