#!/bin/bash set -u send_email() { local address="$1" local subject="$2" local text="$3" echo "Sending mail with text:" echo " ${text}" echo "and subject:" echo " ${subject}" echo "to recipient:" echo " ${address}" return 0 } { send_email "foo.bar@baz.org" "Test subject" "Hello World!" exit "$?" }