Gravar-mail: A Robust Method for Inferring Network Structures