send_report added, columns to 80
This commit is contained in:
21
send_report.sh
Executable file
21
send_report.sh
Executable 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"
|
||||
Reference in New Issue
Block a user