public void send_msg(String empf, String inhalt) {

		int triesLeft = MAX_RETRIES;
		do {
			try {
				server.newMessage(empf, inhalt);

				System.out.println("Message sent!");
				break;
			} catch (RemoteException ex) {
				triesLeft--;

				System.out.println("Failed to send message.");
				System.out.println("Retries left: " + triesLeft);
			}

			try {
				if (triesLeft > 0) {
					System.out.println("Waiting for " + RETRY_TIMEOUT
							+ "ms before next retry...");
					Thread.sleep(RETRY_TIMEOUT);     
				}
			} catch(InterruptedException ex) {
			    Thread.currentThread().interrupt();
			}
			
		} while (triesLeft > 0);
	}