private void MailFiles()
        {
            foreach(string file in files)
            {
                string filename = file;
                string fullpath = setting.printFolder + file;
                string subject = setting.subject + "-" + filename.Substring(0, (filename.Length - 4));

                MailSender sender = new MailSender(setting.smtpServerAddress, setting.smtpServerPort);
                sender.setAddress(setting.fromAddress, setting.toAddress, null, null);
                sender.setMailContent(subject, setting.textBody);
                sender.setAttachment(fullpath);
                sender.sendMail();
                log.WriteEntry(filename + EventCode.SEND_MAIL_TO_USER_INFO, EventLogEntryType.Information);
            }
        }
 private void sentErrrorMail(Exception ex)
 {
     string subject = "[Warning!!!]S1 Payment Operator Service Cashed!!!";
     string content = ex.Message + "\r\n" + ex.StackTrace;
     MailSender sender = new MailSender(setting.smtpServerAddress, setting.smtpServerPort);
     sender.setAddress(setting.fromAddress, setting.toDL_IT, null, null);
     sender.setMailContent(subject, content);
     sender.sendMail();
 }
 private void SendWarningMail(string subject, string content)
 {
     MailSender sender = new MailSender(setting.smtpServerAddress, setting.smtpServerPort);
     sender.setAddress(setting.fromAddress, setting.toDL_IT, null, null);
     sender.setMailContent(subject, content);
     sender.sendMail();
     log.WriteEntry(EventCode.SEND_WARNING_MAIL_TO_IT_INFO, EventLogEntryType.Information);
 }