riteshbawaskar
asked on
Delete mails from pop3 server using perl script
My pop3 sever does not support dele *.* to delete all the messages. I have to delete one by one. Also i am accessing the pop3 server using telnet.
How to delete all mails from the pop3 server using perl script
i am using script as below
#!/usr/local/bin/perl
$username='username';
$password='password';
$MAX_MESS=$1;
sleep 1;
print "USER $username \r\n";
sleep 1;
print "PASS $password \r\n";
sleep 1;
for ($j = 1 ; $j<10;$j++)
{
print "dele $j";
sleep 1;
}
sleep 1;
print "Quit";
and executing it as
deletemails.pl | telnet <ip of pop3 server> 110
the output of the above script does not seem to redirect to the telnet client. Is there any other way?
How to delete all mails from the pop3 server using perl script
i am using script as below
#!/usr/local/bin/perl
$username='username';
$password='password';
$MAX_MESS=$1;
sleep 1;
print "USER $username \r\n";
sleep 1;
print "PASS $password \r\n";
sleep 1;
for ($j = 1 ; $j<10;$j++)
{
print "dele $j";
sleep 1;
}
sleep 1;
print "Quit";
and executing it as
deletemails.pl | telnet <ip of pop3 server> 110
the output of the above script does not seem to redirect to the telnet client. Is there any other way?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.