X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=pingmail;h=f40eb0fba5c711bf0649ac6ce4eeaf579e8afe48;hb=b0385aa88e781c4546bd37c5880f761bea3cb5ae;hp=4724412b90d7c8bb2dcc3c89b1819c625a13e633;hpb=1b3fa2e791597ba751b18fb321b4fe918aa98cbb;p=pingmail.git diff --git a/pingmail b/pingmail index 4724412..f40eb0f 100755 --- a/pingmail +++ b/pingmail @@ -28,19 +28,23 @@ if [ -f $ping_touch ]; then modtime_pingfile=`stat $ping_touch --format=%Y` fi -# search maildir for last life sign datetime +# search mailbox or maildir for last life sign datetime modtime_mails=0 -while read file; do - if [ -z $file ]; then - break - fi - modtime=`stat $file --format=%Y` - if [ "$modtime" -gt "$modtime_mails" ]; then - modtime_mails=$modtime - fi -done < wait time, send reminder to person to check with, start reminder # mail timer if not in existence, re-touch ping wait file if [ "$delta" -gt "$wait_time" ]; then - echo $msg2checked | mutt -s "$subj2checked" $checked_address + echo $msg2checked | $mailclient_s "$subj2checked" $checked_address echo "Sending ping message." touch $ping_touch if [ ! -f "$reminder_touch" ]; then @@ -78,7 +82,7 @@ if [ -f "$reminder_touch" ]; then else delta=`expr $now - $modtime_reminder` if [ "$delta" -gt "$wait_time" ]; then - echo $msg2checker | mutt -s "$subj2checker" $checker_address + echo $msg2checker | $mailclient_s "$subj2checker" $checker_address echo "Sending reminder message." rm $reminder_touch echo "Deleting reminder message wait time file."