Mail via Telnet

This Script sends a Mail via Telnet automatically. I used this to test some things when I set up postfix. Edit the hostname and the mailaddresses

Sleep(5000)
Send("#r")
Sleep(500)
Send("cmd")
Sleep(500)
Send("{enter}")
Sleep(500)
Send("telnet mailserver.lunetikk.de 25")
Sleep(500)
Send("{enter}")
Sleep(8000)
Send("helo")
Sleep(500)
Send("{enter}")
Sleep(500)
Send("mail from:[email protected]")
Sleep(500)
Send("{enter}")
Sleep(500)
Send("rcpt to:[email protected]")
Sleep(500)
Send("{enter}")
Sleep(500)
Send("data")
Sleep(500)
Send("{enter}")
Sleep(500)
Send("subject:")
Sleep(5000)
Send("{enter}")
Sleep(500)
Send("{enter}")
Sleep(500)
Send("This is a test")
Sleep(500)
Send("{enter}")
Sleep(500)
Send("{enter}")
Send(".")
Sleep(500)
Send("{enter}")