Subversion Repositories SmartDukaan

Rev

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

Rev 10158 Rev 10159
Line 184... Line 184...
184
			+"<td><b>" + "Orders Added to Inventory" + "</b></td>"
184
			+"<td><b>" + "Orders Added to Inventory" + "</b></td>"
185
			+"<td><b>" + "Sent Inventory" + "</b></td>"
185
			+"<td><b>" + "Sent Inventory" + "</b></td>"
186
			+"<td><b>" + "Procurement SLA" + "</b></td>"
186
			+"<td><b>" + "Procurement SLA" + "</b></td>"
187
			+"<td><b>" + "Orders on Hold" + "</b></td>"
187
			+"<td><b>" + "Orders on Hold" + "</b></td>"
188
			+"</tr>";
188
			+"</tr>";
189
		
189
 
190
		String tableFooter = "</table></html>";
190
		String tableFooter = "</table></html>";
191
		Item item;
191
		Item item;
192
		StringBuffer feedResponse=  new StringBuffer();
192
		StringBuffer feedResponse=  new StringBuffer();
193
		List<FlipkartInventorySnapshot> inventorysnapshotlist = new ArrayList<FlipkartInventorySnapshot>();
193
		List<FlipkartInventorySnapshot> inventorysnapshotlist = new ArrayList<FlipkartInventorySnapshot>();
194
		for(Entry<Long, FlipkartInventoryItem> entry:flipkartItemsInventoryMap.entrySet()){
194
		for(Entry<Long, FlipkartInventoryItem> entry:flipkartItemsInventoryMap.entrySet()){
Line 376... Line 376...
376
				}
376
				}
377
			}
377
			}
378
		}
378
		}
379
		System.out.println("Before sending email");
379
		System.out.println("Before sending email");
380
		String text = tableHeader+inventoryItems.toString()+tableFooter;
380
		String text = tableHeader+inventoryItems.toString()+tableFooter;
-
 
381
		if(inventoryItems.toString().length()>0){
381
		try {
382
			try {
382
			mailer.sendSSLMessage(sendTo,"Flipkart Inventory Sent Details " + sdf.format(System.currentTimeMillis()), emailFromAddress, password, text);
383
				mailer.sendSSLMessage(sendTo,"Flipkart Inventory Sent Details " + sdf.format(System.currentTimeMillis()), emailFromAddress, password, text);
383
		} catch (MessagingException e) {
384
			} catch (MessagingException e) {
384
			e.printStackTrace();
385
				e.printStackTrace();
-
 
386
			}
385
		}
387
		}
386
		if(backInStockItems.toString().length()>0){
388
		if(backInStockItems.toString().length()>0){
387
			try {
389
			try {
388
				text = tableHeader+backInStockItems.toString()+tableFooter;
390
				text = tableHeader+backInStockItems.toString()+tableFooter;
389
				mailer.sendSSLMessage(sendTo,"Flipkart Inventory Back in Stock " + sdf.format(System.currentTimeMillis()), emailFromAddress, password, text);
391
				mailer.sendSSLMessage(sendTo,"Flipkart Inventory Back in Stock " + sdf.format(System.currentTimeMillis()), emailFromAddress, password, text);
390
			} catch (MessagingException e) {
392
			} catch (MessagingException e) {
391
				e.printStackTrace();
393
				e.printStackTrace();
392
			}
394
			}
393
			
395
 
394
		}
396
		}
395
		if(outOfStockItems.toString().length()>0){
397
		if(outOfStockItems.toString().length()>0){
396
			try {
398
			try {
397
				text = tableHeader+outOfStockItems.toString()+tableFooter;
399
				text = tableHeader+outOfStockItems.toString()+tableFooter;
398
				mailer.sendSSLMessage(sendTo,"Flipkart Inventory Out of Stock " + sdf.format(System.currentTimeMillis()), emailFromAddress, password, text);
400
				mailer.sendSSLMessage(sendTo,"Flipkart Inventory Out of Stock " + sdf.format(System.currentTimeMillis()), emailFromAddress, password, text);
399
			} catch (MessagingException e) {
401
			} catch (MessagingException e) {
400
				e.printStackTrace();
402
				e.printStackTrace();
401
			}
403
			}
402
			
404
 
403
		}
405
		}
404
		if(feedResponse.toString().length()>0){
406
		if(feedResponse.toString().length()>0){
405
			try {
407
			try {
406
				mailer.sendSSLMessage(sendTo, "Flipkart Inventory could not be updated " + sdf.format(System.currentTimeMillis()), feedResponse.toString(), emailFromAddress, password,new ArrayList<File>());
408
				mailer.sendSSLMessage(sendTo, "Flipkart Inventory could not be updated " + sdf.format(System.currentTimeMillis()), feedResponse.toString(), emailFromAddress, password,new ArrayList<File>());
407
			} catch (MessagingException e) {
409
			} catch (MessagingException e) {