Gravar-mail: An innovative magnetic state generator using machine learning techniques