Skip to content
Snippets Groups Projects
Commit 9d84c768 authored by Martin Strbacka's avatar Martin Strbacka
Browse files

mail_notifier: Disabled multiple tries to send message. Messages are marked...

mail_notifier: Disabled multiple tries to send message. Messages are marked with stamp even if smtp server is not configured.
parent ef17d475
No related branches found
No related tags found
No related merge requests found
......@@ -123,24 +123,13 @@ send_mail() {
to=`uci get user_notify.smtp.to`
if [ $smtp_enabled -eq 0 ]; then
mark_msgs
echo "User notifications are not enabled."
else
cat $msg_file | msmtp -C $msmtp_cfg_file $to
err_lvl=$?
if [ $err_lvl -ne 0 ]; then
for i in `seq 3`; do
sleep 10m
cat $msg_file | msmtp -C $msmtp_cfg_file $to
err_lvl=$?
if [ $err_lvl -eq 0 ]; then
mark_msgs
break
fi
done
else
mark_msgs
fi
[ $err_lvl -eq 0 ] && mark_msgs
fi
unlock $locker_stamp
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment