QUERY30DAYS="SELECT username,pw_expires_on FROM mailbox WHERE pw_expires_on > now() + interval 29 DAY AND pw_expires_on < now() + interval 30 day AND thirty = false;"
QUERY14DAYS="SELECT username,pw_expires_on FROM mailbox WHERE pw_expires_on > now() + interval 13 DAY AND pw_expires_on < now() + interval 14 day AND fourteen = false;"
QUERY7DAYS="SELECT username,pw_expires_on FROM mailbox WHERE pw_expires_on > now() + interval 6 DAY AND pw_expires_on < now() + interval 7 day AND seven = false;"
echo -e "Dear User, \n Your password will expire on ${RESULT[1]}"| mail -s "Password 30 days before expiration notication" -r noreply@eyetech.fr ${RESULT[0]}
echo -e "Dear User, \n Your password will expire on ${RESULT[1]}"| mail -s "Password 14 days before expiration notication" -r noreply@eyetech.fr ${RESULT[0]}
echo -e "Dear User, \n Your password will expire on ${RESULT[1]}"| mail -s "Password 7 days before expiraiton notication" -r noreply@eyetech.fr ${RESULT[0]}