rename variables
Log mail import errors on the console
refactor: make intention of code clearer
Check for invalid message ids during import