Created
December 13, 2015 02:43
-
-
Save tsujimitsu/fad4af79541c4e9d9600 to your computer and use it in GitHub Desktop.
read outlook express email from python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import win32com.client | |
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI") | |
inbox = outlook.GetDefaultFolder(6) | |
messages = inbox.Items | |
message = messages.GetLast() | |
# body_content = message.SenderEmailType | |
body_content = message.SenderEmailAddress | |
print body_content | |
#https://msdn.microsoft.com/ja-jp/library/office/ff861252.aspx | |
#http://magazine.rubyist.net/?0007-Win32OLE | |
#http://stackoverflow.com/questions/31619012/extract-senders-email-address-from-outlook-exchange-in-python-using-win32 | |
#https://outlooklab.wordpress.com/2007/03/10/%E5%8F%97%E4%BF%A1%E3%81%97%E3%81%9F%E3%83%A1%E3%83%BC%E3%83%AB%E3%81%AE%E6%B7%BB%E4%BB%98%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E8%87%AA%E5%8B%95%E4%BF%9D%E5%AD%98%E3%81%99%E3%82%8B%E3%83%9E/ | |
#https://support.zendesk.com/hc/ja/articles/203663266-%E5%8F%97%E3%81%91%E4%BB%98%E3%81%91%E3%81%9F%E3%82%B5%E3%83%9D%E3%83%BC%E3%83%88%E3%83%A1%E3%83%BC%E3%83%AB%E3%82%92Zendesk%E3%81%AB%E8%BB%A2%E9%80%81%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment