Skip to content

Latest commit

 

History

History
98 lines (74 loc) · 3.38 KB

README.md

File metadata and controls

98 lines (74 loc) · 3.38 KB

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 protected] -p password --autodiscover -l 5

 python3 scripts/ews-email.py -u [email protected] -p password --autodiscover \
  --to "[email protected]" --to "[email protected]" \
  --cc "[email protected]" --cc "[email protected]" --cc "[email protected]" \
  --bcc "[email protected]" --bcc "[email protected]" \
  --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 [email protected] -p CHANGE_ME --autodiscover \
  --to "[email protected]" --to "[email protected]" \
  --cc "[email protected]" --cc "[email protected]" --cc "[email protected]" \
  --bcc "[email protected]" --bcc "[email protected]" \
  --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