Gravar-mail: Optimal flock formation induced by agent heterogeneity