Subversion Repositories SmartDukaan

Rev

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

Rev 23909 Rev 23910
Line 228... Line 228...
228
	public static void sendMailWithAttachments(JavaMailSender mailSender, String emailTo, String[] cc, String subject, String body, List<File> attachments) throws Exception {
228
	public static void sendMailWithAttachments(JavaMailSender mailSender, String emailTo, String[] cc, String subject, String body, List<File> attachments) throws Exception {
229
		MimeMessage message = mailSender.createMimeMessage();
229
		MimeMessage message = mailSender.createMimeMessage();
230
    	MimeMessageHelper helper = new MimeMessageHelper(message,true);
230
    	MimeMessageHelper helper = new MimeMessageHelper(message,true);
231
    	helper.setSubject(subject);
231
    	helper.setSubject(subject);
232
    	helper.setText(body);
232
    	helper.setText(body);
-
 
233
    	if(cc != null) {
233
    	helper.setCc(cc);
234
    		helper.setCc(cc);
-
 
235
    	}
234
    	helper.setTo(emailTo);
236
    	helper.setTo(emailTo);
235
    	InternetAddress senderAddress = new InternetAddress("noreply@smartdukaan.com", "ProfitMandi Admin");
237
    	InternetAddress senderAddress = new InternetAddress("noreply@smartdukaan.com", "ProfitMandi Admin");
236
    	helper.setFrom(senderAddress);
238
    	helper.setFrom(senderAddress);
-
 
239
    	if(attachments != null) {
237
    	for (File file : attachments) {
240
	    	for (File file : attachments) {
238
    		helper.addAttachment(file.getName(), file);
241
	    		helper.addAttachment(file.getName(), file);
-
 
242
	    	}
239
    	}
243
    	}
240
    	mailSender.send(message);
244
    	mailSender.send(message);
241
	}
245
	}
242
	
246
	
243
	public static String[] getOrderStatus(RechargeOrderStatus status){
247
	public static String[] getOrderStatus(RechargeOrderStatus status){