Im making a little app to use at work when i have multipile emails to delete. since the email server I log on to to delete the emails doesnt have a delete all command i have to do it manualy

dele 1
dele 2
...

this is painful when you have 2000 to delete. im gonna make a loop with the ++ increment thingy.

my problem stoping me from going forward is how to make it execute that in a 3rd party app like telnet. how to make it that it logs in telnet with a username and pass and then execute my loop in telenet is whats troubling me.

Any ideas?