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
Simple SMTP Batch Script
Moderator: DosItHelp
-
- Posts: 319
- Joined: 12 May 2006 01:13
Re: Simple SMTP Batch Script
the windows telnet client is not suited for scripting. Simple as that. Use an email client like blat as suggested. Or you could use a programming language with socket programming.
-
- Posts: 6
- Joined: 19 Aug 2010 21:44
Re: Simple SMTP Batch Script
I think I will lean towards plink as suggested, seems to be the best match the goal I am trying to achieve.
Thanks to all who posted, really appreciate it!
Thanks to all who posted, really appreciate it!