问题描述
我正在通过win32com更好地了解Outlook的互动。我一直无法找到明确的文档,使我能够利用win32com来有效地阅读电子邮件,从目前的调查看来,这似乎是一个很普通的用户感觉。因此,有以下信息和要求:
I'm trying to understand outlook interaction through win32com better. I've been unable to find clear documentation that allows me to utilise win32com to read emails effectively, from my current investigation it seems like a fairly regular sentiment by users. Thus comes the following information and request:
可能有人;
1。提供清楚文档位置的链接(如果存在)
2。下面展开
以下是我根据阅读其他人的代码发现的当前功能。
Below is the current functionality I've found based on reading other peoples code.
采取以下代码:
import win32com
outlook=win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
inbox=outlook.GetDefaultFolder(6)
messages=inbox.Items
for message in messages:
attachments = message.attachments
for attachment in attachments:
pass
以上使用的对象具有以下功能,我知道:
The objects used above have the following functionality that I'm aware of:
收件箱 -
.Folders
.Items
消息 -
.GetFirst()
.GetLast()
.GetNext()
.GetPrevious()
.Attachments
消息 -
.Subject
.Body
.To
.Recipients
.Sender
.Sender.Address
附件 -
.item()
.Count
附件 - / p>
attachment -
.filename
如果你知道任何更多的功能,那么请在你的答案中添加。
If you know of any more functionality then please add to this in your answers.
推荐答案
应用程序的视觉基础参考是你的朋友在这里。尝试从此链接开始...
The visual basic for applications reference is your friend here. Try starting with this link...
例如,我可以看到该消息可能具有比您所拥有的更多属性以上所列。例如
For instance I can see that message will probably have additional properties than what you listed above. For example.
- message.CC
- message.Importance
- message.LastModificationTime
这篇关于用python win32com展望清楚地阅读电子邮件功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!