Hi everyone,
I'm writing a script that connect to telnet and write some email taking the RCPT from a file. My problem is the fact I'm not able to put all the addresses I have in the file as subject for the "RCPT TO:"
...
Can anyone please help me?
Thanks
ps: I wrote this right now
(
ADDRESSES=$(cat "/home/addresses")
sleep 1
echo "helo"
sleep 1
echo "mail from:<abc@foo.com>"
sleep 1
echo "rcpt to:$ADDRESSES"
sleep 10
echo "data"
sleep 1
echo "subject:Test message"
sleep 1
echo "from: <abc@foo.com>"
sleep 1
echo "to: $ADDRESSES"
sleep 1
echo " "
sleep 1
echo "Hello."
sleep 1
echo "This is a test message."
sleep 1
echo "Bye."
sleep 1
echo "."
sleep 1
echo "QUIT"
) | telnet xyz.xyz.xyz.zyx