Email Record: Optimization and learning via stochastic gradient search