How to save attachment from outlook using win32com.client in Python?

后端 未结 3 1133
北海茫月
北海茫月 2020-12-09 06:08

Im trying to read email and download the attachment to my own folder using win32com module in Python, I stopped at getting the attachment object:

from win32c         


        
3条回答
  •  臣服心动
    2020-12-09 06:31

    Where do you think the current working directory is? I'd say you are looking at the wrong folder, SaveAsFile in general works just fine.

    Simply pass a full path to SaveAsFile, that should solve your problem.

提交回复
热议问题