19 lines
463 B
Bash
Executable File
19 lines
463 B
Bash
Executable File
#!/bin/sh
|
|
|
|
[ -z "$1" ] && echo "testmail [user@email]" && exit 1
|
|
|
|
SENDTO=deon@dege.au
|
|
FROMUSER=$1
|
|
TMPFILE=/tmp/testmail.$$
|
|
|
|
echo "To: check-auth-${SENDTO/@/=}@verifier.port25.com" > ${TMPFILE}
|
|
echo "Cc: ${SENDTO}" >> ${TMPFILE}
|
|
echo "From: $1" >> ${TMPFILE}
|
|
echo "Date: `date --rfc-2822`" >> ${TMPFILE}
|
|
|
|
echo "Subject: Test Message" >> ${TMPFILE}
|
|
echo "This is a test message" >> ${TMPFILE}
|
|
echo "--- done" >> ${TMPFILE}
|
|
|
|
cat ${TMPFILE} | ssmtp -t -f ${FROMUSER}
|