Subversion Repositories SmartDukaan

Rev

Rev 36060 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36060 Rev 36251
Line 35... Line 35...
35
    public void cleanupOldMails() {
35
    public void cleanupOldMails() {
36
        if (!isProd) {
36
        if (!isProd) {
37
            return;
37
            return;
38
        }
38
        }
39
        try {
39
        try {
-
 
40
            // SendGrid/Relay: retain 6 months
-
 
41
            mailOutboxService.cleanupOldMails(180, MailOutboxService.SENDER_SENDGRID);
-
 
42
            mailOutboxService.cleanupOldMails(180, MailOutboxService.SENDER_RELAY);
-
 
43
            // Google SMTP: retain 1 month
40
            mailOutboxService.cleanupOldMails(30);
44
            mailOutboxService.cleanupOldMails(30, MailOutboxService.SENDER_GOOGLE);
41
        } catch (Exception e) {
45
        } catch (Exception e) {
42
            LOGGER.error("Error cleaning up old mails", e);
46
            LOGGER.error("Error cleaning up old mails", e);
43
        }
47
        }
44
    }
48
    }
45
}
49
}