Subversion Repositories SmartDukaan

Rev

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

Rev 36251 Rev 37474
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
40
            // Workspace relay: retain 6 months
41
            mailOutboxService.cleanupOldMails(180, MailOutboxService.SENDER_SENDGRID);
41
            mailOutboxService.cleanupOldMails(180, MailOutboxService.SENDER_RELAY);
42
            mailOutboxService.cleanupOldMails(180, MailOutboxService.SENDER_RELAY);
42
            mailOutboxService.cleanupOldMails(180, MailOutboxService.SENDER_RELAY);
43
            // Google SMTP: retain 1 month
43
            // Google SMTP: retain 1 month
44
            mailOutboxService.cleanupOldMails(30, MailOutboxService.SENDER_GOOGLE);
44
            mailOutboxService.cleanupOldMails(30, MailOutboxService.SENDER_GOOGLE);
45
        } catch (Exception e) {
45
        } catch (Exception e) {
46
            LOGGER.error("Error cleaning up old mails", e);
46
            LOGGER.error("Error cleaning up old mails", e);