rpcomp - rohrpost - A commandline mail client to change the world as we see it.
(HTM) git clone git://r-36.net/rohrpost
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
rpcomp (462B)
---
1 #!/bin/sh
2
3 to=""
4 if [ $# -gt 0 ];
5 then
6 to="$1"
7 fi
8
9 BASE="$(rppath -b)"
10
11 if [ ! -x $BASE/tmpl/compose.sh ];
12 then
13 echo "$HOME/.rohrpost/tmpl/compose.sh does not exist. Will" \
14 "not proceed."
15 exit 1
16 fi
17
18 tmpfile=$(mktemp)
19 signalh() {
20 rm -f $tmpfile
21 }
22 trap 'signalh' 3 6 9 15
23
24 dfolder=$(rpcfg -v fold_drafts)
25
26 $BASE/tmpl/compose.sh "${to}" > $tmpfile
27 mid=$(rpadd -m $dfolder -f seen $tmpfile)
28 signalh
29
30 if [ $? -eq 0 ];
31 then
32 rpedit -m $dfolder $mid
33 fi
34