Upgrading the 'email' event handler.