Adding email tracking functionality