Subversion Repositories SmartDukaan

Rev

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

Rev 35640 Rev 35957
Line 3... Line 3...
3
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
3
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
4
import com.spice.profitmandi.common.model.CustomRetailer;
4
import com.spice.profitmandi.common.model.CustomRetailer;
5
import com.spice.profitmandi.common.model.ProfitMandiConstants;
5
import com.spice.profitmandi.common.model.ProfitMandiConstants;
6
import com.spice.profitmandi.common.util.Utils;
6
import com.spice.profitmandi.common.util.Utils;
7
import com.spice.profitmandi.dao.entity.auth.AuthUser;
7
import com.spice.profitmandi.dao.entity.auth.AuthUser;
-
 
8
import com.spice.profitmandi.service.mail.MailOutboxService;
8
import com.spice.profitmandi.dao.entity.cs.*;
9
import com.spice.profitmandi.dao.entity.cs.*;
9
import com.spice.profitmandi.dao.entity.cs.Position;
10
import com.spice.profitmandi.dao.entity.cs.Position;
10
import com.spice.profitmandi.dao.entity.dtr.Document;
11
import com.spice.profitmandi.dao.entity.dtr.Document;
11
import com.spice.profitmandi.dao.entity.cs.TicketReadStatus.UserType;
12
import com.spice.profitmandi.dao.entity.cs.TicketReadStatus.UserType;
12
import com.spice.profitmandi.dao.entity.fofo.ActivityType;
13
import com.spice.profitmandi.dao.entity.fofo.ActivityType;
Line 50... Line 51...
50
 
51
 
51
    @Autowired
52
    @Autowired
52
    JavaMailSender mailSender;
53
    JavaMailSender mailSender;
53
 
54
 
54
    @Autowired
55
    @Autowired
-
 
56
    MailOutboxService mailOutboxService;
-
 
57
 
-
 
58
    @Autowired
55
    private CsService csService;
59
    private CsService csService;
56
 
60
 
57
    @Autowired
61
    @Autowired
58
    private CookiesProcessor cookiesProcessor;
62
    private CookiesProcessor cookiesProcessor;
59
 
63
 
Line 901... Line 905...
901
        return "response";
905
        return "response";
902
    }
906
    }
903
 
907
 
904
    private void activityRelatedMail(String to, String[] cc, String subject, String message) throws ProfitMandiBusinessException {
908
    private void activityRelatedMail(String to, String[] cc, String subject, String message) throws ProfitMandiBusinessException {
905
        try {
909
        try {
906
            Utils.sendMailWithAttachments(mailSender, to, cc, subject, message, null);
910
            mailOutboxService.queueMail(to, cc, subject, message, "CsController.activityRelatedMail");
907
        } catch (Exception e) {
911
        } catch (Exception e) {
908
            throw new ProfitMandiBusinessException("Ticket Activity", to, "Could not send ticket activity mail");
912
            throw new ProfitMandiBusinessException("Ticket Activity", to, "Could not send ticket activity mail");
909
        }
913
        }
910
    }
914
    }
911
 
915