Subversion Repositories SmartDukaan

Rev

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

Rev 9510 Rev 9513
Line 760... Line 760...
760
		File file = new File("/root/code/trunk/SnapDealFeeds/SellerInventory.xls");
760
		File file = new File("/root/code/trunk/SnapDealFeeds/SellerInventory.xls");
761
		MultipartEntity mpEntity = new MultipartEntity();
761
		MultipartEntity mpEntity = new MultipartEntity();
762
	    ContentBody cbFile = new FileBody(file,"application/vnd.ms-excel");
762
	    ContentBody cbFile = new FileBody(file,"application/vnd.ms-excel");
763
	    mpEntity.addPart("file", cbFile);
763
	    mpEntity.addPart("file", cbFile);
764
	    post.setEntity(mpEntity);
764
	    post.setEntity(mpEntity);
765
		response = client.execute(post);
765
		//response = client.execute(post);
766
		try {
766
		try {
767
			rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
767
			rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
768
		} catch (IllegalStateException e1) {
768
		} catch (IllegalStateException e1) {
769
			// TODO Auto-generated catch block
769
			// TODO Auto-generated catch block
770
			e1.printStackTrace();
770
			e1.printStackTrace();
Line 823... Line 823...
823
			}
823
			}
824
		}
824
		}
825
		List<File> files = new ArrayList<File>();
825
		List<File> files = new ArrayList<File>();
826
		files.add(new File(SNAPDEAL_INVENTORY_SHEET));
826
		files.add(new File(SNAPDEAL_INVENTORY_SHEET));
827
		try {
827
		try {
828
			mailer.sendSSLMessage(sendTo,"Inventory File","Please see attached inventory file with Feed ID " + line, emailFromAddress, password, files);
828
			mailer.sendSSLMessage(sendTo,"Inventory File","Please see attached inventory " + line, emailFromAddress, password, files);
829
		} catch (MessagingException e) {
829
		} catch (MessagingException e) {
830
			e.printStackTrace();
830
			e.printStackTrace();
831
		}
831
		}
832
 
832
 
833
 
833