public void Update(Mail mail) { using (IMailDao dao = this.getDaoContext().DaoImpl.MailDao) { dao.Update(mail); } }
public ICollection <Mail> GetUnsentMails() { using (IMailDao dao = this.getDaoContext().DaoImpl.MailDao) { return(dao.GetUnsentMails()); } }
public ICollection <Mail> GetMailsWithoutAttachment() { using (IMailDao dao = this.getDaoContext().DaoImpl.MailDao) { return(dao.GetMailsWithoutAttachment()); } }
//public RawMessage LoadRawMessage(string appCode, string uid) //{ // HTF.CR.Mail.MailServiceMapper service = new HTF.CR.Mail.MailServiceMapper(); // RawMessage msg = service.GetStampe(appCode, uid); // return msg; //} //public Comunicazioni LoadComunicazione(string appCode, string uid) //{ // HTF.CR.Mail.MailServiceMapper service = new HTF.CR.Mail.MailServiceMapper(); // Comunicazioni msg = service.GetStampeComunicazioni(appCode, uid); // return msg; //} public Mail GetMail(long idMail) { using (IMailDao dao = this.getDaoContext().DaoImpl.MailDao) { return(dao.GetById(idMail)); } }
public CourierController( ICurrentUserService currentUserService, IMailDao mailDao ) { _currentUserService = currentUserService; _mailDao = mailDao; }
public int Save(Mail mail) { using (IMailDao dao = this.getDaoContext().DaoImpl.MailDao) { dao.Insert(mail); return((int)mail.IdMail); } }
public StockmanController( ICurrentUserService currentUserService, IBranchesDao branchesDao, IMailDao mailDao) { _currentUserService = currentUserService; _branchesDao = branchesDao; _mailDao = mailDao; }
public QMail() { QMailConfigurationSection config = (QMailConfigurationSection)ConfigurationManager.GetSection("qmailConfiguration"); // maxMailsToSend = ConfigHelper.DefaultInt("qmail.max-mails-to-send", 0); // log.Debug("qmail.max-mails-to-send=" + maxMailsToSend); // maxMinutesToRun = ConfigHelper.DefaultInt("qmail.max-minutes-to-run", 0); // log.Debug("qmail.max-minutes-to-run=" + maxMinutesToRun); maxMailsPerHour = config.MaxMailsPerHour; // ConfigHelper.DefaultInt("qmail.max-mails-per-hour", 0); log.Info("qmail.max-mails-per-hour=" + maxMailsPerHour); maxMailsPerDay = config.MaxMailsPerDay; // ConfigHelper.DefaultInt("qmail.max-mails-per-day", 0); log.Info("qmail.max-mails-per-day=" + maxMailsPerDay); // isExitOnEmptyQueue = ConfigHelper.DefaultBool("qmail.exit-on-empty-queue", true); // log.Debug("qmail.exit-on-empty-queue=" + isExitOnEmptyQueue); // checkIntervalMinutes = ConfigHelper.DefaultInt("qmail.check-interval-minutes", 1); // checkIntervalMinutes = Math.Max(1, checkIntervalMinutes); checkIntervalMinutes = config.CheckIntervalMinutes; log.Info("qmail.check-interval-minutes=" + checkIntervalMinutes); //archiveSentMailsAfterHours = ConfigHelper.DefaultInt("qmail.archive-sent-mails-after-hours", 24); archiveSentMailsAfterHours = config.ArchiveSentMailsAfterHours; log.Info("qmail.archive-sent-mails-after-hours=" + archiveSentMailsAfterHours); deleteArchivedMailsAfterHours = config.DeleteArchivesMailsAfterHours; log.Info("qmail.delete-archived-mails-after-hours=" + deleteArchivedMailsAfterHours); if (config.Folders != null && config.Folders.PickupFolder != null && config.Folders.SentFolder != null) { dao = new FileMailDao(); } else { if (config.MailTable != null && config.ArchiveMailTable != null) { dao = new MailDao(); } } ISmtpClient basic = new BasicSmtpClient(); //ISmtpClient basic = new TestSmtpClient(); ISmtpClient filter = new FilteringSmtpClient(basic); smtpClient = filter; }
public HomeController(IMailDao mailDao) { _mailDao = mailDao; }