details.ui.statusBar.setText(datetime.strftime(datetime.now(),"%d.%m.%Y %H:%M:%S")+" - Unable to establish connection to mailbox. Check your mail settings and make sure that you have not network problems")
window.trayIcon.setToolTip("Cannot find configuration file. You should give access to your mailbox")
details.ui.statusBar.setText(datetime.strftime(datetime.now(),"%d.%m.%Y %H:%M:%S")+" - Cannot find configuration file. You should give access to your mailbox")
else:
# When mailbox has unread letters
window.trayIcon.setToolTip("You have "+str(mail_count)+" unread letters")
details.ui.statusBar.setText(datetime.strftime(datetime.now(),"%d.%m.%Y %H:%M:%S")+" - Mail check completed. You have "+str(mail_count)+" unread letters")
# check was successfull, lastCheckCount is updating