#!/bin/bash LANG="en_US.UTF-8" # Set Your Email Email="YourEamil@here.com" subject="CRON Test" test_data='Multi-Report v3.1 dtd:2025-02-02 (TrueNAS Scale 24.10.1)
Report Run 02-Jan-2025 Thursday @ 05:10:16
Total Memory: 19Gi, Used Memory: 3.8Gi, Free Memory: 15Gi, Swap Used: 0B
System Uptime: 0:46:37.519297
Script Execution Time: 11 Seconds
When Hell Freezes Over

' html_data=$(echo $test_data | jq -Rs .) midclt call -job mail.send "{ \"subject\": \"${subject}\", \"html\": $html_data, \"to\": [\"${Email}\"] }"