// 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; } }
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); }
public static string XML_ZIP_RESULT(TypeGetReport typeGet) { return Path.ChangeExtension(XML_RESULT(typeGet), ".zip"); }
public Asker(TypeGetReport typeGet, bool mailed, bool archiveMail) { this.typeGet = typeGet; this.mailed = mailed; this.archiveMail = archiveMail; }