* @param currentMsg the message to be stores
* @param recipient the address of the recipient
*/
public void store(Message currentMsg, Address recipient) {
// Get the serverIP of the recipient
Domain domain = recipient.getDomain();
String serverIP = DNSUtil.MXLookup(domain.getDomain());
// Check that the serverIP is not null
if (serverIP == null){
// If it is, log the error
logManager.writeExceptionEntry("Error: cannot find MX entry for " + domain.toString());
}
// Otherwise, Determine if the serverIP is a preexisting key
// If it is, store the message there
else if (table.containsKey(serverIP)){
RemoteServerMessage RSM = (RemoteServerMessage) table.get(serverIP); // Get the list of messages