code: protected String getSenderEmail(Message mailMessage) throws MessagingException
      {
          Address[] addresses=mailMessage.getFrom();
          String senderEmail=null;
          if((addresses!=null)&&(addresses.length>0))
          {
              //get sender mail address (only first from is used)
              Address address=addresses[0];
              
              //get as string
              senderEmail=address.toString();
          }
  
          return senderEmail;
      }
docs: Returns the sender email from the provided mail object.
  
  @param   mailMessage
  The mail message with the fax data
  @return  The sender email
  @throws  MessagingException
  Any exception while handling the mail message