diff --git a/mail2mms.sh b/mail2mms.sh index f3d74d8..cd080f5 100755 --- a/mail2mms.sh +++ b/mail2mms.sh @@ -65,12 +65,13 @@ while true; do # If the number of new mails has increased if [ ${newnew} -gt ${oldnew} ]; then - echo "$(summary)" \ - | mail -r ${addr} \ - -s "new mail [${newnew}]" \ - ${phone} + echo "From: ${addr} +To: ${phone} +Subject: new mail [${newnew}] + +$(summary)" | msmtp -t --read-envelope-from fi oldnew=${newnew} - sleep 10m + sleep 600 done