public static void recv(String provider, String server, String user,
			String password)
	{
		Store store = null;
		Folder folder = null;
		try
		{
			// -- Get hold of the default session --
			Properties props = System.getProperties();
			Session session = Session.getDefaultInstance(props, null);
			// -- Get hold of a POP3 message store, and connect to it --
			store = session.getStore(provider);
			store.connect(server, user, password);
			// -- Try to get hold of the default folder --
			folder = store.getDefaultFolder();
			if (folder == null)
			{
				throw new Exception("No default folder");
			}
			// -- ...and its INBOX --
			folder = folder.getFolder("INBOX");
			if (folder == null)
			{
				throw new Exception("No POP3 INBOX");
			}
			// -- Open the folder for read only --
			folder.open(Folder.READ_ONLY);
			// -- Get the message wrappers and process them --
			Message[] msgs = folder.getMessages();
			for (int msgNum = 0; msgNum < msgs.length; msgNum++)
			{
				printMessage(msgs[msgNum]);
			}
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
		}
		finally
		{
			// -- Close down nicely --
			try
			{
				if (folder != null)
				{
					folder.close(false);
				}
				if (store != null)
				{
					store.close();
				}
			}
			catch (Exception ex2)
			{
				ex2.printStackTrace();
			}
		}
	}