public MessageListResult search ( String server , SearchCriteria criteria ) throws IOException , MailosaurException { HashMap < String , String > query = new HashMap < String , String > ( ) ; query . put ( "server" , server ) ; return client . request ( "POST" , "api/messages/search" , criteria , query ) . parseAs ( MessageListResult . class ) ; }
Search for messages . Returns a list of messages matching the specified search criteria . The messages are returned sorted by received date with the most recently - received messages appearing first .