Files
steve-reporting/send_report.sh
2025-10-30 19:48:06 +01:00

22 lines
533 B
Bash
Executable File

#!/bin/bash
# Configuratie
TO_EMAIL="mark@markkors.nl"
FROM_EMAIL="laadpaal@raspberry.local"
SUBJECT="Laadrapport $(date +%d-%m-%Y)"
# Genereer rapport
REPORT=$(python3 ~/reports/steve_transaction_report.py --host 192.168.178.201 --port 3307 --user steve --password 'kS9R*xp17ZwCD@CV&E^N' --price-user alfen_user --price-password '5uVgr%f%s2P5GR@3q!' --limit 1)
# Verstuur email met headers
cat <<EOF | msmtp "$TO_EMAIL"
Subject: $SUBJECT
From: $FROM_EMAIL
To: $TO_EMAIL
$REPORT
EOF
echo "✓ Rapport verzonden naar $TO_EMAIL"