Simple SMTP Batch Script
Posted: 18 Jan 2011 12:23
Hi there,
I'm trying to write a simple smtp batch script that will test relays in our multiple servers.
Here's the script looks like:
telnet 10.144.134.125 25
sleep 1
echo "helo localhost"
sleep 1
echo "mail from:admin_net@postteam.com"
sleep 1
echo "rcpt to: dei_bertine@post.com"
sleep 1
echo "data"
sleep 1
echo "subject:Test message from web01 srv1"
sleep 1
echo "Hello there!"
sleep 1
echo "."
sleep 1
echo "QUIT" << END_SCRIPT
Here's the problem:
When I initiate this script, it hangs after "telnet 10.144.134.125 25" then just sits there and script doesnt proceed...
Is there a some sort of "switch" parameter that I need to add after "telnet 10.144.134.125 25?"
Any help is appreciate mates!
DB
I'm trying to write a simple smtp batch script that will test relays in our multiple servers.
Here's the script looks like:
telnet 10.144.134.125 25
sleep 1
echo "helo localhost"
sleep 1
echo "mail from:admin_net@postteam.com"
sleep 1
echo "rcpt to: dei_bertine@post.com"
sleep 1
echo "data"
sleep 1
echo "subject:Test message from web01 srv1"
sleep 1
echo "Hello there!"
sleep 1
echo "."
sleep 1
echo "QUIT" << END_SCRIPT
Here's the problem:
When I initiate this script, it hangs after "telnet 10.144.134.125 25" then just sits there and script doesnt proceed...
Is there a some sort of "switch" parameter that I need to add after "telnet 10.144.134.125 25?"
Any help is appreciate mates!
DB