send_report added, columns to 80

This commit is contained in:
Mark Kors
2025-10-30 19:48:06 +01:00
parent 6a722f6bf2
commit 288b7cd162
2 changed files with 50 additions and 30 deletions

21
send_report.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/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"