code: protected String getTargetAddress(Message mailMessage) throws MessagingException
      {
          //by default the target address is taken from the mail subject which
          //is expected to be in the format of: fax:<number>
          String subject=mailMessage.getSubject();
          String targetAddress=null;
          if((subject!=null)&&(subject.startsWith("fax:"))&&(subject.length()>4))
          {
              targetAddress=subject.substring(4);
          }
  
          return targetAddress;
      }
docs: Returns the target address from the provided mail object.
  
  @param   mailMessage
  The mail message with the fax data
  @return  The target address
  @throws  MessagingException
  Any exception while handling the mail message