Tweaked emailUpdates function