Subversion Repositories SmartDukaan

Rev

Rev 36249 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36249 Rev 36250
Line 225... Line 225...
225
    @Transactional(propagation = Propagation.REQUIRES_NEW)
225
    @Transactional(propagation = Propagation.REQUIRES_NEW)
226
    public void cleanupOldMails(int daysOld) {
226
    public void cleanupOldMails(int daysOld) {
227
        mailOutboxRepository.deleteOldSentMails(daysOld);
227
        mailOutboxRepository.deleteOldSentMails(daysOld);
228
    }
228
    }
229
 
229
 
-
 
230
    @Transactional(propagation = Propagation.REQUIRES_NEW)
-
 
231
    public void cleanupOldMails(int daysOld, String senderType) {
-
 
232
        mailOutboxRepository.deleteOldSentMailsBySenderType(daysOld, senderType);
-
 
233
    }
-
 
234
 
230
    private void sendAndUpdateStatus(MailOutbox mail) {
235
    private void sendAndUpdateStatus(MailOutbox mail) {
231
        try {
236
        try {
232
            List<MailOutboxAttachment> attachments = mailOutboxRepository.selectAttachmentsByMailId(mail.getId());
237
            List<MailOutboxAttachment> attachments = mailOutboxRepository.selectAttachmentsByMailId(mail.getId());
233
            sendSmtp(mail, attachments);
238
            sendSmtp(mail, attachments);
234
            mail.setStatus("SENT");
239
            mail.setStatus("SENT");