muzicman82 Posted January 10, 2007 Share Posted January 10, 2007 I'm trying to write a PHP script for a cron job that will do the following:- Connect to a POP3 server.- Check the logged in user's current used space.- If the used space is a certain size, send an e-mail notifying.- If the used space is a certain size, delete all messages.Basically, we're on shared hosting that doesn't have IMAP support with PHP. The purpose of this script is to manage some mailboxes that aren't typical users. We've just switch to this host and they don't provide the ability to set a mailbox quota. So, to prevent a mailbox from filling up with SPAM, etc, this cron script will dump it when it reaches a certain size and notify an admin when it does something.I have looked at PEAR's Net_POP3, but couldn't get much of that to work. I may spend some more time with it, but wasn't having much luck. I do have SSH access and have created a local copy of the PEAR folders. I tried an example script but it kept giving me a general connection error... but I wasn't getting any other error. I'm on the lookout for an alternate class or something that will work. Quote Link to comment Share on other sites More sharing options...
matto Posted January 10, 2007 Share Posted January 10, 2007 I found an example of interacting with POP3 using sockets[url=http://www.thescripts.com/forum/thread1790.html]http://www.thescripts.com/forum/thread1790.html[/url]If you know what commands to send to the server to do the things you want it should be a matter of using something like[code]fputs($socket, "$command\r\n"); // send command[/code]Good luck with that.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.