diff --git a/test/send-test-mail.sh b/test/send-test-mail.sh new file mode 100755 --- /dev/null +++ b/test/send-test-mail.sh @@ -0,0 +1,79 @@ +#!/bin/sh + +# send-test-mail.sh - pipe 00-testmail through vacation(1) for user ws + +# usage: send-test-mail.sh [user] + +# Copyright (C) 2012, Wolfgang Scherer, +# Sponsored by WIEDENMANN SEILE GMBH, http://www.wiedenmannseile.de +# +# This file is part of Wiedenmann Vacation. +# +: # script help +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see , +# or write to Wolfgang Scherer, + +# -------------------------------------------------- +# |||:sec:||| FUNCTIONS +# -------------------------------------------------- + +usage () +{ + script_help="script-help" + ( "${script_help}" ${1+"$@"} "${0}" ) 2>/dev/null \ + || ${SED__PROG-sed} -n '3,/^[^#]/{;/^[^#]/d;p;}' "${0}"; +} + +test x"${1+set}" = xset && \ +case "${1}" in +-\?|-h|--help) usage; exit 0;; +--docu) usage --full; exit 0;; +esac + +# -------------------------------------------------- +# |||:sec:||| MAIN +# -------------------------------------------------- + +# |:here:| + +USER="${1-ws}" + +cat 00-testmail-vacation | formail | vacation "${USER}" + +exit # |||:here:||| + +# +# :ide-menu: Emacs IDE Main Menu - Buffer @BUFFER@ +# . M-x `eIDE-menu' (eIDE-menu "z") + +# :ide: SNIP: insert OPTION LOOP +# . (snip-insert-mode "sh_b.opt-loop" nil t) + +# :ide: SHELL: Run with --docu +# . (progn (save-buffer) (shell-command (concat "sh " (file-name-nondirectory (buffer-file-name)) " --docu"))) + +# :ide: SHELL: Run with --help +# . (progn (save-buffer) (shell-command (concat "sh " (file-name-nondirectory (buffer-file-name)) " --help"))) + +# :ide: SHELL: Run w/o args +# . (progn (save-buffer) (shell-command (concat "sh " (file-name-nondirectory (buffer-file-name)) " "))) + +# +# Local Variables: +# mode: sh +# comment-start: "#" +# comment-start-skip: "#+" +# comment-column: 0 +# End: +# mmm-classes: (here-doc ide-entries)