Subversion Repositories SmartDukaan

Rev

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

Rev 10122 Rev 10123
Line 372... Line 372...
372
			}
372
			}
373
		}
373
		}
374
		System.out.println("Before sending email");
374
		System.out.println("Before sending email");
375
		String text = tableHeader+inventoryItems.toString()+tableFooter;
375
		String text = tableHeader+inventoryItems.toString()+tableFooter;
376
		try {
376
		try {
377
			mailer.sendSSLMessage(sendTo,"Flipkart Inventory Sent Details ", emailFromAddress, password, text);
377
			mailer.sendSSLMessage(sendTo,"Flipkart Inventory Sent Details " + sdf.format(System.currentTimeMillis()), emailFromAddress, password, text);
378
		} catch (MessagingException e) {
378
		} catch (MessagingException e) {
379
			e.printStackTrace();
379
			e.printStackTrace();
380
		}
380
		}
381
		if(backInStockItems.toString().length()>0){
381
		if(backInStockItems.toString().length()>0){
382
			try {
382
			try {
383
				text = tableHeader+backInStockItems.toString()+tableFooter;
383
				text = tableHeader+backInStockItems.toString()+tableFooter;
384
				mailer.sendSSLMessage(sendTo,"Flipkart Inventory Back in Stock ", emailFromAddress, password, text);
384
				mailer.sendSSLMessage(sendTo,"Flipkart Inventory Back in Stock " + sdf.format(System.currentTimeMillis()), emailFromAddress, password, text);
385
			} catch (MessagingException e) {
385
			} catch (MessagingException e) {
386
				e.printStackTrace();
386
				e.printStackTrace();
387
			}
387
			}
388
			
388
			
389
		}
389
		}
390
		if(outOfStockItems.toString().length()>0){
390
		if(outOfStockItems.toString().length()>0){
391
			try {
391
			try {
392
				text = tableHeader+outOfStockItems.toString()+tableFooter;
392
				text = tableHeader+outOfStockItems.toString()+tableFooter;
393
				mailer.sendSSLMessage(sendTo,"Flipkart Inventory Out of Stock ", emailFromAddress, password, text);
393
				mailer.sendSSLMessage(sendTo,"Flipkart Inventory Out of Stock " + sdf.format(System.currentTimeMillis()), emailFromAddress, password, text);
394
			} catch (MessagingException e) {
394
			} catch (MessagingException e) {
395
				e.printStackTrace();
395
				e.printStackTrace();
396
			}
396
			}
397
			
397
			
398
		}
398
		}
399
		if(feedResponse.toString().length()>0){
399
		if(feedResponse.toString().length()>0){
400
			try {
400
			try {
401
				mailer.sendSSLMessage(sendTo, "Flipkart Inventory could not be updated ", feedResponse.toString(), emailFromAddress, password,new ArrayList<File>());
401
				mailer.sendSSLMessage(sendTo, "Flipkart Inventory could not be updated " + sdf.format(System.currentTimeMillis()), feedResponse.toString(), emailFromAddress, password,new ArrayList<File>());
402
			} catch (MessagingException e) {
402
			} catch (MessagingException e) {
403
				e.printStackTrace();
403
				e.printStackTrace();
404
			}
404
			}
405
		}
405
		}
406
		else{
406
		else{
407
			try {
407
			try {
408
				mailer.sendSSLMessage(sendTo, "Flipkart Inventory updated successfully ", feedResponse.toString(), emailFromAddress, password,new ArrayList<File>());
408
				mailer.sendSSLMessage(sendTo, "Flipkart Inventory updated successfully " + sdf.format(System.currentTimeMillis()), feedResponse.toString(), emailFromAddress, password,new ArrayList<File>());
409
			} catch (MessagingException e) {
409
			} catch (MessagingException e) {
410
				e.printStackTrace();
410
				e.printStackTrace();
411
			}
411
			}
412
		}
412
		}
413
	}
413
	}