Subversion Repositories SmartDukaan

Rev

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

Rev 25837 Rev 25996
Line 680... Line 680...
680
			partnerSnapshotMap.put(fofoId, file);
680
			partnerSnapshotMap.put(fofoId, file);
681
 
681
 
682
		}
682
		}
683
		for (Map.Entry<String, Set<Integer>> entry : authUserPartnerIdMapping.entrySet()) {
683
		for (Map.Entry<String, Set<Integer>> entry : authUserPartnerIdMapping.entrySet()) {
684
			String email = entry.getKey();
684
			String email = entry.getKey();
-
 
685
			LOGGER.info("Sending mail start to {}", email);
685
			Set<Integer> partnerIds = entry.getValue();
686
			Set<Integer> partnerIds = entry.getValue();
686
			StringBuffer body = new StringBuffer();
687
			StringBuffer body = new StringBuffer();
687
			Map<Integer, File> emailSnapshotMap = new HashMap<>();
688
			Map<Integer, File> emailSnapshotMap = new HashMap<>();
688
			for (int fofoId : partnerIds) {
689
			for (int fofoId : partnerIds) {
689
				body.append(String.format("<br/><img src=\"cid:%d\"/>", fofoId));
690
				body.append(String.format("<br/><img src=\"cid:%d\"/>", fofoId));
690
				emailSnapshotMap.put(fofoId, partnerSnapshotMap.get(fofoId));
691
				emailSnapshotMap.put(fofoId, partnerSnapshotMap.get(fofoId));
691
			}
692
			}
692
			Utils.sendEmbeddedHtmlMail(mailSender, new String[] { email }, new String[] {},
693
			Utils.sendEmbeddedHtmlMail(mailSender, new String[] { email }, new String[] {},
693
					String.format("Franchise Screenshots - %s", FormattingUtils.formatDate(LocalDateTime.now())),
694
					String.format("Franchise Screenshots - %s", FormattingUtils.formatDate(LocalDateTime.now())),
694
					body.toString(), emailSnapshotMap);
695
					body.toString(), emailSnapshotMap);
-
 
696
			LOGGER.info("Sent mail to {}", email);
695
		}
697
		}
696
		driver.quit();
698
		driver.quit();
697
	}
699
	}
698
}
700
}
699
 
701