-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi_hourly_send_mail.sh
More file actions
24 lines (16 loc) · 923 Bytes
/
api_hourly_send_mail.sh
File metadata and controls
24 lines (16 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
BASE_PATH=/home/oracle/deepesh/dashboard
TEMPLATE_HTML=/home/oracle/deepesh/dashboard/template.html
Date=`date +'%Y%m%d'`
p_interval=8
DATE=`date +'%d %B %Y : %H' -d '1 hour ago'`
##############Email
SUBJECT="Paypro UMB Hourly Report $DATE"
TO=deepesh.arora@spicelabs.in,deepak.budhiraja@spicelabs.in,inderjot.singh@spicelabs.in,harnek.singh@spicelabs.in,harsh.bansal@spicelabs.in
CC=amritpal.singh@spicelabs.in,rajesh.mahajan@spicelabs.in,ajendra.bisht@spicelabs.in,dfsproduct@spicelabs.in,techops.paypro@spicelabs.in
############################Creating HTML
#echo $ROWS
/usr/bin/scp -i $BASE_PATH/private_key.ppk opc@172.16.8.73:/home/opc/scripts/dashboard/apifinal.html $BASE_PATH
echo "file fetched!"
#mutt -e "set content_type=text/html" "deepesh.arora@spicelabs.in" -s "$SUBJECT" < $BASE_PATH/apifinal.html
mutt -e "set content_type=text/html" $TO -c $CC -s "$SUBJECT" < $BASE_PATH/apifinal.html