#!/ffp/bin/sh
####################################
#######Modositva MrDini altal#######
####################################

##
##  User-configurable Variables
##

# Where "nail" is installed on your system.
# We need this to actually send the mail, so make sure it's installed
NAIL=/ffp/bin/mailx

# REQUIRED CHANGE #1: you must set SMTP_SERVER
# http://www.host45.com/resources/ispsmtps.php has a list of ISP's smtp servers
SMTP_SERVER=smtp.gmail.com:587

# REQUIRED CHANGE #2: you must set your email address.
# option A: change "yourname@yourmail.com" here and remove the leading '#' to
# use a real email address
# ide fogja kuldeni az e-mailt
TO_ADDR=<email>@gmail.com
#

###
###  Send the mail...
###

SUBJECT="A torrent letoltodott!"
FROM_ADDR="transmission@localhost.localdomain"
TMPFILE=`mktemp -t transmission.XXXXXXXXXX`
echo "A Transmission befejezte a \"$TR_TORRENT_NAME\" letolteset A befejezes idopontja $TR_TIME_LOCALTIME" >$TMPFILE
sleep 2
$NAIL -v -S smtp -s "$SUBJECT" -S smtp-use-starttls -S ssl-verify=ignore -S smtp-auth=login -S smtp-auth-user=<email>@gmail.com -S smtp-auth-password="<jelszo>" -S smtp=$SMTP_SERVER "$TO_ADDR" < $TMPFILE
rm $TMPFILE
