예제 #1
0
파일: Mailer.cs 프로젝트: weerci/askme-one
        // Public
        public void SendMail(TypeGetReport typeGet, bool archiveMail)
        {
            this.typeGet = typeGet;
            this.archiveMail = archiveMail;
            SmtpClient client = new SmtpClient(smtpHost, smtpPort);
            client.Credentials = new NetworkCredential(smtpUserName, smtpUserPass);

            MailMessage message = new MailMessage(msgFrom, msgTo, msgSubject, msgBody);
            GetAttachment(message);

            try
            {
                client.Send(message);
                Log.ToLog(CommonString.EmailSended);
            }
            catch (SmtpException err)
            {
                Log.ToLog(err.Message);
                throw;
            }
        }
예제 #2
0
파일: Common.cs 프로젝트: weerci/askme-one
 public static string XML_RESULT(TypeGetReport typeGet)
 {
     if (typeGet == TypeGetReport.handle)
         return Path.GetDirectoryName(Application.ExecutablePath) + "\\resultFile\\" +
             String.Format("{0}_{1}_{2}_{3}_PRUSSES1.xml", Common.SysProp.classValue, Common.SysProp.innValue,
              Common.SysProp.officeDateReport.ToString("yyyyMMdd"), Common.SysProp.numberValue);
     else
         return Path.GetDirectoryName(Application.ExecutablePath) + "\\resultFile\\" +
             String.Format("{0}_{1}_{2}_{3}_PRUSSES1.xml", Common.SysProp.classValue, Common.SysProp.innValue,
             DateTime.Now.AddDays(-1).ToString("yyyyMMdd"), Common.SysProp.numberValue);
 }
예제 #3
0
파일: Common.cs 프로젝트: weerci/askme-one
 public static string XML_ZIP_RESULT(TypeGetReport typeGet)
 {
     return Path.ChangeExtension(XML_RESULT(typeGet), ".zip");
 }
예제 #4
0
파일: Asker.cs 프로젝트: weerci/askme-one
 public Asker(TypeGetReport typeGet, bool mailed, bool archiveMail)
 {
     this.typeGet = typeGet;
     this.mailed = mailed;
     this.archiveMail = archiveMail;
 }