private void SendErrorMessage(IDictionary dictionary, string emailContent)
{
string smtpServer = (string)dictionary["smtp_server"];
string emailTo = (string)dictionary["email_to"];
string[] emailAddresses = emailTo.Split(new char[]{';'});
string emailFrom = (string)dictionary["email_from"];
//string emailContent = ExceptionUtilities.GetExceptionString(_exception, 0, true);
EmailSender emailSender = new EmailSender(emailAddresses, emailFrom, _exception.Source, emailContent, "");
////Todo : check Send Authenticated for security purposes?
emailSender.SmtpServerHost = smtpServer;
string port = (string)dictionary["smtp_port"];
if (!String.IsNullOrEmpty(port))
{
emailSender.SmtpServerPort = Convert.ToInt32(port);
}
bool enableSSL = Convert.ToBoolean(dictionary["smtp_enable_ssl"]);
emailSender.EnableSSL = enableSSL;
emailSender.Send();
}