- Send an email with attachment
#!/bin/bash
ATTFILE=$1
ATTNAME=$1
MAILTO=you@domain.com
MAILFROM=you@domain.com
( cat <<HERE; uuencode "${ATTFILE}" "${ATTNAME}" ) | sendmail -oi -t
From: ${MAILFROM}
To: ${MAILTO}
Subject: bla bla
blabla...
HERE