Steps:
Open the config.py file in the Python sandbox below. This is the global configuration file containing your Mist API Token, Mist UUIDs, Gmail credentials, and more.
Update the gmail_id (username) and gmail_password (password) variables in the config.py file with your Gmail credentials. These are used to authenticate with the SMTP server and send email reports.
Open the Mist web UI, navigate to Monitor, and select the Insights tab to see the site insights. Scroll to the bottom of the page for graphs of Pre-connection and Post-connection data.
Modify main.py in the Python sandbox to include the email address which will receive the emailed report. This is saved under the recipient variable.
Run main.py below and observe the following:
Check the email recipient’s Inbox to see the final report.