added quotes to email

This commit is contained in:
2022-05-20 18:25:22 -04:00
parent 5f3090a7f1
commit a578717a86

View File

@@ -25,7 +25,7 @@ echo "Inventory Quantity: ${INVENTORY_QUANTITY}" | tee -a "${LOG_FILE}"
if [[ "${INVENTORY_QUANTITY}" -gt "0" ]]; then
MESSAGE="There are currently ${INVENTORY_QUANTITY} ${NAME} in stock. ${URL}"
echo "Message: ${MESSAGE}" | tee -a "${LOG_FILE}"
echo "${MESSAGE}" | mailx -r "stockalerts@johnhgaunt.com" --set smtp="smtp.home.johnhgaunt.com:25" ${EMAIL}
echo "${MESSAGE}" | mailx -r "stockalerts@johnhgaunt.com" --set smtp="smtp.home.johnhgaunt.com:25" "${EMAIL}"
echo "Email sent" | tee -a "${LOG_FILE}"
else
echo "Not sending email" | tee -a "${LOG_FILE}"