Skip to content

Microsoft Office 365 EWS (Exchange Web Services) Client Library

License

Notifications You must be signed in to change notification settings

greenpau/PyEwsClient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyEwsClient

Overview

Microsoft Office 365 EWS (Exchange Web Services) Client Library

Usage

Office 365 Email

usage: ews-email.py [-h] (-s SERVER | --autodiscover) -u USERNAME -p PASSWORD
                    [--to TO] [--cc CC] [--bcc BCC] --subject SUBJECT --body
                    BODY [--attach ATTACHMENT] [--format FORMAT]
                    [--sensitivity LEVEL] [--importance LEVEL]
                    [--delivery-receipt] [--read-receipt] [--mark-read]
                    [-l LEVEL]

PyEwsClient - Microsoft Office 365 Client Library Testing Tool

examples:

 python3 scripts/ews-email.py -u email@office365.com -p password --autodiscover -l 5

 python3 scripts/ews-email.py -u email@office365.com -p password --autodiscover \
  --to "to1@microsoft.com" --to "to2@microsoft.com" \
  --cc "cc1@microsoft.com" --cc "cc2@microsoft.com" --cc "cc3@microsoft.com" \
  --bcc "bcc1@microsoft.com" --bcc "bcc2@microsoft.com" \
  --subject "Sample Subject" --body "Sample Body" \
  --format plain --sensitivity "Confidential" \
  --importance "High" --delivery-receipt --read-receipt --mark-read \
  --attach scripts/attach1.txt --attach scripts/attach2.txt -l 1

 python3 scripts/ews-email.py --help

optional arguments:
  -h, --help            show this help message and exit
  -l LEVEL, --log-level LEVEL
                        log level (default: 0, max: 5)

network connectivity arguments:
  -s SERVER, --server SERVER
                        Office 365 Server
  --autodiscover        Office 365 Autodiscovery On

authentication arguments:
  -u USERNAME, --user USERNAME
                        Office 365 Username
  -p PASSWORD, --password PASSWORD
                        Office 365 Password

email arguments:
  --to TO               Email Receipient(s) To:
  --cc CC               Email Receipient(s) Cc:
  --bcc BCC             Email Receipient(s) Bcc:
  --subject SUBJECT     Email Subject
  --body BODY           Email Body
  --attach ATTACHMENT   Email Attachment(s)
  --format FORMAT       Email Format (plain or html)
  --sensitivity LEVEL   Email Sensitivity, e.g. Normal, Personal, Private,
                        Confidential
  --importance LEVEL    Email Importance, e.g. High, Normal, Low
  --delivery-receipt    Request Delivery Receipt
  --read-receipt        Request Read Receipt
  --mark-read           Mark Read

documentation:
 https://github.com/greenpau/PyEwsClient

Office 365 Email Draft Screenshot

Office 365 Email Draft

The above email draft was generated by running the below command:

wget https://raw.githubusercontent.com/greenpau/PyEwsClient/master/scripts/ews-email.py -q

chmod +x ews-email.py

wget https://raw.githubusercontent.com/greenpau/PyEwsClient/master/scripts/attach1.txt -q

wget https://raw.githubusercontent.com/greenpau/PyEwsClient/master/scripts/attach2.txt -q

python3 ews-email.py -u CHANGE_ME@office365.com -p CHANGE_ME --autodiscover \
  --to "to1@microsoft.com" --to "to2@microsoft.com" \
  --cc "cc1@microsoft.com" --cc "cc2@microsoft.com" --cc "cc3@microsoft.com" \
  --bcc "bcc1@microsoft.com" --bcc "bcc2@microsoft.com" \
  --subject "Sample Subject" --body "Sample Body" \
  --format plain --sensitivity "Confidential" \
  --importance "High" --delivery-receipt --read-receipt --mark-read \
  --attach attach1.txt --attach attach2.txt -l 1

About

Microsoft Office 365 EWS (Exchange Web Services) Client Library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published