summaryrefslogtreecommitdiff
path: root/sendmail
blob: 473231ce1b9964027c82ad22c13de4ac0e66d47f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#! /usr/bin/env sh

# msmtpq has weird exit semantics. if it fails to send, it returns a bunch of
# text which emacs treats as "failure to send" but msmtpq treats as "added to
# outbot to send later". i guess exit code is not respected by emacs? anyway,
# msmtpq does not drop messages, but saves them in a queue, so we can just fire
# and forget. next time we get online, msmtpq will send all the messages in the
# queue.

d=$(date)
echo $d >> ~/tmp/msmtp.log
echo $d >> ~/tmp/msmtp.err
msmtpq "$@" >> ~/tmp/msmtp.log 2> ~/tmp/msmtp.err
exit 0