throw new NameLookupException (new Exception (s));
throw new UnregisteredNameException(destination);
    public synchronized MessageAttributes forwardMessage (AttributedMessage msg)       throws NameLookupException, UnregisteredNameException,             CommFailureException, MisdeliveredMessageException    {if (log.isDebugEnabled()) log.debug("Enter forwardMessage("+MessageUtils.toString(msg)+")", new Throwable());//if (log.isDebugEnabled()) log.debug("raw msg = "+msg.getRawMessage(), new Throwable());      //  Dump our cached data on message send retries      if (MessageUtils.getSendTry (msg) > 3) decache();  //104B changed to 3 because of wp callback      //  Get emailing info for destination          URI uri = lookupEmailAddress(destination);      if (uri == null)      {        String s = "No Email Address found for " + destination;        if (log.isWarnEnabled()) log.warn (s);if (log.isDebugEnabled()) log.debug("Exit forwardMessage("+MessageUtils.toString(msg)+")");//if (log.isDebugEnabled()) log.debug("raw msg = "+msg.getRawMessage());        throw new NameLookupException (new Exception (s));      }      //  Send message via email      boolean success = false;      Exception save = null;      try       {        success = sendMessage (msg, uri);      }       catch (Exception e)       {        if (log.isDebugEnabled()) log.debug ("sendMessage: " +stackTraceToString(e));        save = e;      }      //  Dump our cached data on failed sends and throw an exception      if (success == false)      {        decache(); //104B        Exception e = (save==null ? new Exception ("email sendMessage unsuccessful") : save);if (log.isDebugEnabled()) log.debug("Exit forwardMessage("+MessageUtils.toString(msg)+")");//if (log.isDebugEnabled()) log.debug("raw msg = "+msg.getRawMessage());        throw new CommFailureException (e);      }      //  Successful send      MessageAttributes successfulSend = new SimpleMessageAttributes();      String status = MessageAttributes.DELIVERY_STATUS_DELIVERED;      successfulSend.setAttribute (MessageAttributes.DELIVERY_ATTRIBUTE, status);if (log.isDebugEnabled()) log.debug("Exit forwardMessage("+MessageUtils.toString(msg)+")");//if (log.isDebugEnabled()) log.debug("raw msg = "+msg.getRawMessage());      return successfulSend;    }