All Projects → awangga → Outlook

awangga / Outlook

Python library to read email from live, hotmail, outlook, office365 or any microsoft email service

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Outlook

Python O365
A simple python library to interact with Microsoft Graph and Office 365 API
Stars: ✭ 742 (+265.52%)
Mutual labels:  outlook
Msgkit
A .NET library to make MSG files without the need for Outlook
Stars: ✭ 74 (-63.55%)
Mutual labels:  outlook
Prospect Mail
Prospect is an Outlook mail desktop client powered by Electron
Stars: ✭ 112 (-44.83%)
Mutual labels:  outlook
Simple Java Mail
Simple API, Complex Emails (JavaMail smtp wrapper)
Stars: ✭ 821 (+304.43%)
Mutual labels:  outlook
Outlookgooglecalendarsync
Sync your Outlook and Google calendars
Stars: ✭ 1,113 (+448.28%)
Mutual labels:  outlook
Calendarsyncplus
This utility synchronizes Calendar entries between different calendar providers (Apps like Outlook,Services EWS/Google/Live).
Stars: ✭ 80 (-60.59%)
Mutual labels:  outlook
Outlookcaldavsynchronizer
Sync Outlook with Google, SOGo, Nextcloud or any other CalDAV/CardDAV server
Stars: ✭ 560 (+175.86%)
Mutual labels:  outlook
Freelook
Freelook, an Electron-based client for Microsoft Outlook.
Stars: ✭ 159 (-21.67%)
Mutual labels:  outlook
Msgviewer
MsgViewer is email-viewer utility for .msg e-mail messages, implemented in pure Java. MsgViewer works on Windows/Linux/Mac Platforms. Also provides a java api to read mail messges (msg files) programmatically.
Stars: ✭ 61 (-69.95%)
Mutual labels:  outlook
Email To Pdf Converter
Converts email files (eml, msg) to pdf
Stars: ✭ 110 (-45.81%)
Mutual labels:  outlook
Scheduler
Automates completion and emailing of .xlsx time sheet.
Stars: ✭ 34 (-83.25%)
Mutual labels:  outlook
Ost2pst
OST2PST - converts Outlook OST files to PST format
Stars: ✭ 46 (-77.34%)
Mutual labels:  outlook
Kotlin Agendacalendarview
Android calendar library provides easy to use widget with events
Stars: ✭ 81 (-60.1%)
Mutual labels:  outlook
Exchangelib
Python client for Microsoft Exchange Web Services (EWS)
Stars: ✭ 787 (+287.68%)
Mutual labels:  outlook
Xstreader
Xst Reader is an open source viewer for Microsoft Outlook’s .ost and .pst files, written entirely in C#. To download an executable of the current version, go to the releases tab.
Stars: ✭ 149 (-26.6%)
Mutual labels:  outlook
Infospider
INFO-SPIDER 是一个集众多数据源于一身的爬虫工具箱🧰,旨在安全快捷的帮助用户拿回自己的数据,工具代码开源,流程透明。支持数据源包括GitHub、QQ邮箱、网易邮箱、阿里邮箱、新浪邮箱、Hotmail邮箱、Outlook邮箱、京东、淘宝、支付宝、中国移动、中国联通、中国电信、知乎、哔哩哔哩、网易云音乐、QQ好友、QQ群、生成朋友圈相册、浏览器浏览历史、12306、博客园、CSDN博客、开源中国博客、简书。
Stars: ✭ 5,984 (+2847.78%)
Mutual labels:  outlook
Waveboxapp
Wavebox Classic has been updated to Wavebox 10. Learn more Wavebox.io
Stars: ✭ 1,198 (+490.15%)
Mutual labels:  outlook
Stormkitty
🔑 Open source stealer written on C#, all logs will be sent to Telegram bot.
Stars: ✭ 198 (-2.46%)
Mutual labels:  outlook
Org Msg
OrgMsg is a GNU/Emacs global minor mode mixing up Org mode and Message mode to compose and reply to emails in a Outlook HTML friendly style.
Stars: ✭ 153 (-24.63%)
Mutual labels:  outlook
Vbasync
Cross-platform tool to synchronize macros from an Office VBA-enabled file with a version-controlled folder
Stars: ✭ 98 (-51.72%)
Mutual labels:  outlook

Python Outlook (Microsoft email service) Library

Python Library to read email from live, hotmail, outlook or any microsoft email service, just dowload to yout python script folder. This library using Imaplib python to read email with IMAP protocol.

Prerequisite Libraries

Please make sure you have these libraries installed on your system first before running this code:

  • email
  • imaplib
  • smtplib
  • datetime

then rename config.py.sample to config.py and edit comment in config.py file

Examples

To get latest Unread Message in inbox:

import outlook
mail = outlook.Outlook()
mail.login('[email protected]','yourpassword')
mail.inbox()
print mail.unread()

To get latest Unread Message in Junk:

import outlook
mail = outlook.Outlook()
mail.login('[email protected]','yourpassword')
mail.junk()
print mail.unread()

Use mail.select(folder) to switch to folders other than inbox,junk`.

Retrive email element:

print mail.mailbody()
print mail.mailsubject()
print mail.mailfrom()
print mail.mailto()

To send Message:

import outlook
mail = outlook.Outlook()
mail.login('[email protected]','yourpassword')
mail.sendEmail('[email protected]','subject','message body')

To check Credentials:

import outlook
mail = outlook.Outlook()
mail.checkLogin()

Reading e-mails from Outlook with Python through MAPI and get email with word 'skype id':

import Skype4Py
import outlook
import time
import config
import parser

skype = Skype4Py.Skype()
skype.Attach()

def checkingFolder(folder):
	mail = outlook.Outlook()
	mail.login(config.outlook_email,config.outlook_password)
	mail.readOnly(folder)
	print "  Looking Up "+folder
	try:
		unread_ids_today = mail.unreadIdsToday()
		print "   unread email ids today : "
		print unread_ids_today
		unread_ids_with_word = mail.getIdswithWord(unread_ids_today,'skype id')
		print "   unread email ids with word Skype ID today : "
		print unread_ids_with_word
	except:
		print config.nomail
	#fetch Inbox folder
	mail = outlook.Outlook()
	mail.login(config.outlook_email,config.outlook_password)
	mail.select(folder)
	try:
		for id_w_word in unread_ids_with_word:
			mail.getEmail(id_w_word)
			subject = mail.mailsubject()
			message = mail.mailbody()
			skypeidarr = parser.getSkype(message)
			print subject
			print skypeidarr
			i = 0
			while i < len(skypeidarr):
				skype.SendMessage(skypeidarr[i],config.intromsg+subject+"\r\n with Content : \r\n"+message)
				i += 1
			config.success()
			print "  sending reply message..."
			print "  to :"+mail.mailfrom().split('>')[0].split('<')[1]
			print "  subject : "+subject
			print "  content : "+config.replymessage
			mail.sendEmail(mail.mailfrom().split('>')[0].split('<')[1],"Re : "+subject,config.replymessage)
			time.sleep(10)
	except:
		print config.noword
		time.sleep(10)
		
while True:
	#checking ids in Inbox Folder
	print config.checkinbox
	checkingFolder('Inbox')
	#checking Junk Folder
	print config.checkjunk
	checkingFolder('Junk')
	

Forward zoom recording email to recipients a mailing list:

Use fwd_zoom.py. The class OutlookMailForwarder defined there has the capability to filter messages based on the received time (a time window from now -- in hours), and to do string search in email subject and body. Additionaly, a filter can be defined to change the body before sending the email. For example, in fwd_zoom.py:

def filter_zoom_mailbody(mailbody):
    ''' Returns the link to share. This filters out other info in the email such as the host-only link'''
    m = re.search(r'Share recording with viewers:<br>\s*(.*)\b', mailbody)
    return m.group(1)

To run, you can either define your email[space]password in .cred or giveemail/password in stdin upon prompt. NOTE: Do not forget to chmod 400 ./.cred if the former method is used.

Example 1: With existing .cred with contents [email protected] mypassword and a small time window:

./fwd_zoom.py
How many hours to llok back?1
(' > Signed in as [email protected]', ['LOGIN completed.'])
looking up pattern in 3/3 most recent emails in folder zoom
1 items match subject_pattern
1 items match subject_pattern and body_pattern
skipping email_id 213 because its timedelta 6:31:25.556269 is greater than 1 hours

Example 2: without a .cred file and a large-enough time window:

./fwd_zoom.py
Outlook email:[email protected]
Outlook Password:
How many hours to look back?10
(' > Signed in as [email protected]', ['LOGIN completed.'])
looking up pattern in 3/3 most recent emails in folder zoom
1 items match subject_pattern
1 items match subject_pattern and body_pattern
email_id 213 is within range (6:45:22.572372 < 10:00:00)
maillsubject to send: Cloud Recording - Zoom Meeting is now available Tue, 12 Nov 2019 16:51:48 +0000
mailbody to send: https://test.zoom.us/recording/share/4abdcsefkHergre45grdgDdafdefMWd
   Sending email...
   email sent.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].