Subversion Repositories SmartDukaan

Rev

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

Rev 16655 Rev 17080
Line 698... Line 698...
698
	                // closes
698
	                // closes
699
	                activity.setDescription("To: " + toMailIds + "\n\nSubject: " + escalationMailSubject + "\n\n"
699
	                activity.setDescription("To: " + toMailIds + "\n\nSubject: " + escalationMailSubject + "\n\n"
700
	                        + "Body: " + escalationMailBody);
700
	                        + "Body: " + escalationMailBody);
701
                }
701
                }
702
            }
702
            }
-
 
703
            
-
 
704
            try{
-
 
705
    	        if (ActivityType.RECEIVED_CALL_FROM_CUSTOMER.equals(activity.getType())) {
-
 
706
    	        	String addTo[] = new String[]{"amit.sirohi@shop2020.in","rajneesh.arora@saholic.com"};
-
 
707
    	        	
-
 
708
    	        	String commonDescription = "Received Call From Customer || Email Id- ";
-
 
709
	        		if (customerEmailId != null && !customerEmailId.isEmpty()) {
-
 
710
	        			commonDescription = commonDescription+customerEmailId;
-
 
711
	        		}
-
 
712
	        		if(customerMobileNumber != null
-
 
713
	                        && !customerMobileNumber.isEmpty()) {
-
 
714
	        			commonDescription = commonDescription+" & Mobile No:- "+customerMobileNumber;
-
 
715
	        		}
-
 
716
    	        	
-
 
717
    	        	sendMailToManagers(commonDescription, addTo, description);
-
 
718
    	        }
-
 
719
            }
-
 
720
    	    catch(Exception e){
-
 
721
    	    	e.printStackTrace();
-
 
722
    	    }
703
 
723
 
704
            User user = null;
724
            User user = null;
705
            userContextServiceClient = new UserClient().getClient();
725
            userContextServiceClient = new UserClient().getClient();
706
            try {
726
            try {
707
                if (customerName != null && !customerName.isEmpty()) {
727
                if (customerName != null && !customerName.isEmpty()) {
Line 1370... Line 1390...
1370
		email.setHtml(body);
1390
		email.setHtml(body);
1371
		log.info("Mail Body:- "+body);
1391
		log.info("Mail Body:- "+body);
1372
		sendgrid.send(email);
1392
		sendgrid.send(email);
1373
		log.info("Mail sent to user:- "+customerEmailId);
1393
		log.info("Mail sent to user:- "+customerEmailId);
1374
    }
1394
    }
-
 
1395
    
-
 
1396
    private void sendMailToManagers(String subject, String[] addTo, String body) throws SendGridException{
-
 
1397
    	SendGrid sendgrid = new SendGrid("profitmandi", "pma20aug");
-
 
1398
		SendGrid.Email email = new SendGrid.Email();
-
 
1399
		email.setFrom(CRMConstants.PROFIT_MANDI_EMAIL_SENDER);
-
 
1400
		email.setFromName("ProfitMandi");
-
 
1401
		email.addTo(addTo);
-
 
1402
		email.addBcc("backup@saholic.com");
-
 
1403
		email.setSubject(subject);
-
 
1404
		email.setHtml(body);
-
 
1405
		log.info("Mail Body:- "+body);
-
 
1406
		sendgrid.send(email);
-
 
1407
		log.info("Mail sent to user:- "+addTo);
-
 
1408
    }
1375
 
1409
 
1376
    public TicketPriority[] getTicketPriorities() {
1410
    public TicketPriority[] getTicketPriorities() {
1377
        return TicketPriority.values();
1411
        return TicketPriority.values();
1378
    }
1412
    }
1379
 
1413