我在Python中使用ExchangeLib。想把我的邮件从一个文件夹移到另一个文件夹。在
# I logined the Exchange Server and took the items as below:
all_items=account.inbox.all()
# then wanted to move the folder as below:
target_folder=account.inbox.get_folder_by_name("TCN")
recentone = all_items[0]
# then I wanted to move the folder to "TCN"
recentone.folder=target_folder;
recentone.save()
但是,它不起作用,我目前无法找到解决办法。 有没有其他方法可以移动项目的文件夹?在
提前谢谢你。在
我已经把问题发到了github上,得到的答案如下:
不能像这样在文件夹之间移动项目:-)需要使用move()方法。见https://github.com/ecederstrand/exchangelib#creating-updating-deleting-sending-and-moving
简而言之,以下代码适用于移动文件夹
相关问题 更多 >
编程相关推荐