# 主程序******#
#參數設置
Download_path = r'C:\Users\1\Desktop\4月關於“為用戶創造價值的思考和理解”的總結報告\aaaa'
wkb_path = r"C:\Users\1\Desktop\4月關於“為用戶創造價值的思考和理解”的總結報告\匯總.xlsx"
sheetname2 = '郵箱接受文件數'
old_maildir = 'INBOX'
new_maildir = '&XfJfUmhj-/&XfJn5ZYFZwllSA-'
rubbish_maildir = '&XfJfUmhj-/&U4ZT8leDVz5lh072-'
host = 'imap.263.net'
post = '143'
uesr = '**'
passwrod = ''#啟動imap郵箱服務
conn = Start_mailbox(host,post,uesr,passwrod)
'''查看imap郵箱有多少個文件夾,imap不是ut-f8編碼,不能自動編譯,需自行查看
try:
type_, folders = conn.list()
for i in folders:
print(i)
except BaseException as e:
print("the {0}:{1} no file".format("imap.263.net", 143), e)
'''
imap4(conn,old_maildir,new_maildir,Download_path,wkb_path,sheetname2)
#remove_email(old_maildir,rubbish_maildir)#移動收件箱數據到指定的文件夾中
#'''