Gravar e-mail: Analysis of algorithms and mathematical models for automation of electronic document management