--- /dev/null
+#!/bin/bash
+
+# copyright 2012-2013 Holger Levsen <holger@layer-acht.org>
+# GPL2 licenced
+
+set -e
+#set -x
+export
+echo
+
+#
+# check if mail should be sent
+#
+if [ ${AUTOTEST_SEND_RESULT_MAIL} == "false" ]; then
+ echo "No result mail will be send."
+fi
+
+#
+# check if we have a LIVEBOOT_BUILD_NUMBER
+#
+if [ "$LIVEBOOT_BUILD_NUMBER" != "" ] ; then
+ echo "Ok, got LIVEBOOT_BUILD_NUMBER=$LIVEBOOT_BUILD_NUMBER, which is valid."
+else
+ echo "Fail, no LIVEBOOT_BUILD_NUMBER set."
+ exit 1
+fi
+
+if [ "$AUTOTEST_MAIL_CONTENT" != "" ] ; then
+ echo "Ok, got AUTOTEST_MAIL_CONTENT."
+else
+ echo "Fail, no LIVEBOOT_BUILD_NUMBER set."
+ exit 1
+fi
+
+# Replace the place holders
+BUILD_NUMBER_TOKEN="<BUILD_NUMBER>"
+MAIL_CONTENT=`echo ${$AUTOTEST_MAIL_CONTENT//$BUILD_NUMBER_TOKEN/$LIVEBOOT_BUILD_NUMBER}`
+
+echo $MAIL_CONTENT
+exit 0
+
+#
+# send announcement mail
+#
+cat $MAIL_CONTENT | /usr/sbin/sendmail -t
+echo
+echo "Ok, announcement mail sent."
+
+#
+# finish
+#
+figlet Ok
+