Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata
cat << 'EOL'>sendmail_busybox.sh
#!/bin/sh
FROM="username@gmail.com"
AUTH="username"
PASS="password"
FROMNAME="Parted Magic LiveISO"
TO="username@gmail.com"
IP="$(ip -4 addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')"

SUBJECT="Parted Magic LiveISO Running"
BODY="The PartedMagic LiveISO is Running a VNC server on $IP:60 PASS_WD=PartedMagic"

SENDMAIL=/sbin/sendmail
#G-Mail
SERVER=smtp.gmail.com
#Comcast Business
#SERVER=smtp.hmc1.comcast.net
#Comcast Residential
#smtp.comcast.net
PORT=587

echo "Subject: $SUBJECT
From: \"$FROMNAME\" <$FROM>
Date: $(date -R)

$BODY

" |  "$SENDMAIL" \
-H"exec openssl s_client -quiet -connect $SERVER:$PORT -tls1 -starttls smtp" \
-f"$FROM" -au"$AUTH" -ap"$PASS" $TO 
EOL
chmod +x sendmail_busybox.sh
./sendmail_busybox.sh
  • No labels