Gravar-mail: Energy-efficient Optimization of Reorganization-Enabled Wireless Sensor Networks