Retrieve a message from the POP3 server. A retrieve message attempt can only succeed if the client is in the {@link org.apache.commons.net.pop3.POP3#TRANSACTION_STATE TRANSACTION_STATE }. Returns a DotTerminatedMessageReader instance from which the entire message can be read. Returns null if the retrieval attempt fails (e.g., if the specified message number does not exist).
You must not issue any commands to the POP3 server (i.e., call any other methods) until you finish reading the message from the returned Reader instance. The POP3 protocol uses the same stream for issuing commands as it does for returning results. Therefore the returned Reader actually reads directly from the POP3 connection. After the end of message has been reached, new commands can be executed and their replies read. If you do not follow these requirements, your program will not work properly.
@param messageId The number of the message to fetch.
@return A DotTerminatedMessageReader instancefrom which the entire message can be read. Returns null if the retrieval attempt fails (e.g., if the specified message number does not exist).
@exception IOException If a network I/O error occurs in the process ofsending the retrieve message command.