Subversion Repositories SmartDukaan

Rev

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

Rev 16532 Rev 16642
Line 31... Line 31...
31
import in.shop2020.thrift.clients.TransactionClient;
31
import in.shop2020.thrift.clients.TransactionClient;
32
import in.shop2020.thrift.clients.UserClient;
32
import in.shop2020.thrift.clients.UserClient;
33
import in.shop2020.util.CRMConstants;
33
import in.shop2020.util.CRMConstants;
34
import in.shop2020.util.CRMConstants.EscalationMatrix;
34
import in.shop2020.util.CRMConstants.EscalationMatrix;
35
import in.shop2020.util.CRMConstants.PMEscalationMatrix;
35
import in.shop2020.util.CRMConstants.PMEscalationMatrix;
-
 
36
import in.shop2020.util.SendGridException;
36
import in.shop2020.utils.HelperService.Client;
37
import in.shop2020.utils.HelperService.Client;
37
import in.shop2020.utils.HelperServiceException;
38
import in.shop2020.utils.HelperServiceException;
38
import in.shop2020.utils.ModelUtils;
39
import in.shop2020.utils.ModelUtils;
39
 
40
 
40
import java.text.DateFormat;
41
import java.text.DateFormat;
Line 606... Line 607...
606
	                activity.setUserEmailId(helperClient.saveUserEmailForSending(
607
	                activity.setUserEmailId(helperClient.saveUserEmailForSending(
607
	                        Arrays.asList(customerEmailId), CRMConstants.CRM_EMAIL_SENDOR,
608
	                        Arrays.asList(customerEmailId), CRMConstants.CRM_EMAIL_SENDOR,
608
	                        subject, body, null, CRMConstants.CRM_EMAIL_TYPE, null, null, 1));
609
	                        subject, body, null, CRMConstants.CRM_EMAIL_TYPE, null, null, 1));
609
                }else{
610
                }else{
610
                	try{
611
                	try{
611
                		SendGrid sendgrid = new SendGrid("profitmandi", "pma20aug");
-
 
612
                		SendGrid.Email email = new SendGrid.Email();
-
 
613
                		email.setFrom(CRMConstants.PROFIT_MANDI_EMAIL_SENDER);
-
 
614
                		email.setFromName("ProfitMandi");
-
 
615
                		email.addTo(customerEmailId);
-
 
616
                		email.addBcc("backup@saholic.com");
-
 
617
                		email.setSubject(subject);
-
 
618
                		email.setHtml("<pre>"+body+"<pre>");
-
 
619
                		sendgrid.send(email);                		
612
                		sendMailToUser();          		
620
                	
613
                	
621
                	} catch(Exception e){
614
                	} catch(Exception e){
622
                		log.error("Error while sending mail to user:- "+customerEmailId+" ticket Id:- "+ticket.getId(), e);
615
                		log.error("Error while sending mail to user:- "+customerEmailId+" ticket Id:- "+ticket.getId(), e);
623
                	}
616
                	}
624
                	
617
                	
Line 1361... Line 1354...
1361
    			}
1354
    			}
1362
    		}
1355
    		}
1363
    		return requiredCategories;
1356
    		return requiredCategories;
1364
    	}
1357
    	}
1365
    }
1358
    }
-
 
1359
    
-
 
1360
    private void sendMailToUser() throws SendGridException{
-
 
1361
    	SendGrid sendgrid = new SendGrid("profitmandi", "pma20aug");
-
 
1362
		SendGrid.Email email = new SendGrid.Email();
-
 
1363
		email.setFrom(CRMConstants.PROFIT_MANDI_EMAIL_SENDER);
-
 
1364
		email.setFromName("ProfitMandi");
-
 
1365
		email.addTo(customerEmailId);
-
 
1366
		email.addBcc("backup@saholic.com");
-
 
1367
		email.setSubject(subject);
-
 
1368
		email.setHtml("<pre>"+body+"<pre>");
-
 
1369
		sendgrid.send(email);      
-
 
1370
    }
1366
 
1371
 
1367
    public TicketPriority[] getTicketPriorities() {
1372
    public TicketPriority[] getTicketPriorities() {
1368
        return TicketPriority.values();
1373
        return TicketPriority.values();
1369
    }
1374
    }
1370
 
1375