Please refer this script if you want to generate External IP Address of Devices as one report and send the report in E-Mail.Refer the following link for the script.
For more info on the script functionality and the process used in this script please refer the following wikitopic https://wiki.comodo.com/frontend/web/topic/how-to-run-reports-script-in-all-devices-and-configuring-mailjet-to-send-an-email