def get_sent(): SYNCApi.get_sent() return MailApi().get_folder('Sent')
def sync(): SYNCApi().download_new_mails_from_server()
def get_deleted(): SYNCApi.get_folder(folder_name='Deleted') return MailApi().get_folder('Deleted')
def get_flagged(): SYNCApi.get_flagged() return MailApi().get_folder('Flagged')
def get_unwanted(): SYNCApi.get_folder(folder_name='Junk') return MailApi().get_folder('Junk')
def get_starred(): SYNCApi.get_folder(folder_name='Starred') return MailApi().get_folder('Starred')
def get_number_unread(): return SYNCApi().get_number_unread()
def mark_as_seen(uid): SYNCApi.mark_as_seen(uid=str(uid)) return True
@eel.expose def pong(): return "ping" @eel.expose def ui_log(message): logger.debug(f'UI: {message}') @eel.expose def ui_log_error(message): logger.error(f'UI: {message}') if __name__ == '__main__': say_hello_py('Server') # eel.say_hello_js('Server connected.') # Call a Javascript function template = UserApi.check_if_user_exists() if template == 'index.html': processes = [ multiprocessing.Process( target=SYNCApi().download_new_mails_from_server, args=()) for x in range(4) ] eel.start(template, block=True) # Start else: eel.start(template, block=True) # Start