PHP 8.1.33
Preview: fakesendmail.sh Size: 474 B
/home/jambtst2015/public_html/giraffeng.com/admin/mail_function/test/fakesendmail.sh

#!/usr/bin/env bash
#Fake sendmail script, adapted from:
#https://github.com/mrded/MNPP/blob/ee64fb2a88efc70ba523b78e9ce61f9f1ed3b4a9/init/fake-sendmail.sh

#Create a temp folder to put messages in
numPath="${TMPDIR-/tmp/}fakemail"
umask 037
mkdir -p $numPath

if [ ! -f $numPath/num ]; then
  echo "0" > $numPath/num
fi
num=`cat $numPath/num`
num=$(($num + 1))
echo $num > $numPath/num

name="$numPath/message_$num.eml"
while read line
do
  echo $line >> $name
done
exit 0

Directory Contents

Dirs: 0 × Files: 9

Name Size Perms Modified Actions
140 B lrw-r--r-- 2024-11-22 17:53:01
Edit Download
16.64 KB lrw-r--r-- 2025-11-02 16:12:33
Edit Download
2.93 KB lrw-r--r-- 2024-11-22 17:53:01
Edit Download
474 B lrw-r--r-- 2024-11-22 17:53:01
Edit Download
2.32 KB lrw-r--r-- 2024-11-22 17:53:01
Edit Download
51.00 KB lrw-r--r-- 2024-11-22 17:53:01
Edit Download
361 B lrw-r--r-- 2024-11-22 17:53:01
Edit Download
238 B lrw-r--r-- 2024-11-22 17:53:01
Edit Download
2.63 KB lrw-r--r-- 2024-11-22 17:53:01
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).