home · contact · privacy
Send TODO mail to user on server postinstall script finish.
[config] / bin / simplemail.sh
diff --git a/bin/simplemail.sh b/bin/simplemail.sh
new file mode 100755 (executable)
index 0000000..6cbc552
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+#
+# This mails to user plom the message in the file named by the first parameter,
+# decoded with the first line as subject and everything below the second line
+# as the message body. The subject line MUST NOT contain '"' double quotes.
+
+subject=`head -1 $1`
+body=`tail -n +2 $1`
+echo $body | mutt -s "$subject" plom