I wanna send an email via a command in Centos7. I used 'telnet' command for this issue like this:
I touch example.sh file and save these command inside it :
echo "open mail.test.com 25"
sleep 3
echo "mail from:sender@test.com"
echo "rcpt to:receiver@test.com"
echo "data"
echo "hello"
echo "."
sleep 3
and use this command ./example.sh | telnet
but it dosn't work
could you please help me thanks