Avoid multiple email import sessions
Brought to you by:
grzegorz_nawara
It's possible that emails are imported multiple times. This is when an email has huge attachment. While this attachment is being imported there comes consecutive (cron) import email session. It is because import_emails() function saves email object at the very end of import_emails() function just after exit_onsave and all possible operations.