Skip to content

Retrieve Emails from Office365 via MSGraph Interface

License

Notifications You must be signed in to change notification settings

ksuquix-forks/o365getmail

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

o365getmail

Retrieve Emails from Office365 via MSGraph Interface

This Python script may be used to retriev emails from Office 365 according to the new OAuth protocol. It's not the perfect solution right now.
This script tries to fix malformed Emails by boxing them into a forward mail.
Feel free to improve the script and in case you find some better solution, please let me know.

Requirements:

Python 3
see imports at script header

Getting Started

First run:
execute the script with python o365getmail --auth to get initial tokens.
You will get a URL for past an copy to an Browser for Identification. After successful identification copy the returnd URL and past it back.

After successful token creation execute:
execute the script silent: ./o365getmail
or
execute the script: ./o365getmail --verbose
After success use it with cron

Available flags

Short Long Explanation
--version 'Print script version.'
-a --auth 'Get initial or refresh token if authentification expired.'
-k --keep 'Keep messages after pushing to MDA.'
-v --verbose 'Output logger infromation to Screen.'
-m --message 'Email message as ''*.eml'' to push to RT.'
-l --limit 'Limit email pull to number of message to be pulled at once.'

About

Retrieve Emails from Office365 via MSGraph Interface

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%