Added Discord Webhook function
This commit is contained in:
parent
442af2b02d
commit
4cfaf71b06
6
check.sh
6
check.sh
@ -7,6 +7,9 @@ domains=$(cat /LOCATION/OF/domains.txt)
|
||||
sender_email="SENDER_NAME"
|
||||
receiver_email="RECEIVER_EMAIL"
|
||||
|
||||
# Discord Webhook
|
||||
WEBHOOK_URL="WEBHOOK_URL"
|
||||
|
||||
# Initialize an empty array to store the expiring domains and their days left
|
||||
expiring_domains=()
|
||||
|
||||
@ -44,5 +47,8 @@ if [ ${#expiring_domains[@]} -gt 0 ]; then
|
||||
|
||||
# Send the email
|
||||
echo -e "$body" | mail -s "$subject" -a "From: $sender_email" "$receiver_email"
|
||||
|
||||
curl -H "Content-Type: application/json" -X POST --data "{\"content\": null, \"embeds\": [{\"title\": \"$subject\", \"description\": \"$body\", \"color\": null}], \"attachments\": []}" $WEBHOOK_URL
|
||||
|
||||
fi
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user