adam84 Posted January 29, 2008 Share Posted January 29, 2008 Hello, I have an email account on my server. When someone sends me an email, I was to create a script that would process the data that was in the email. Does anyone know what I need to do or if that can be done? Quote Link to comment https://forums.phpfreaks.com/topic/88467-email-script/ Share on other sites More sharing options...
trq Posted January 29, 2008 Share Posted January 29, 2008 Of course it can be done. You'll more than likely want to write a script that checks your ~/.mailbox directory for new mail, then (depending on what exactly you mean by process) do whatever needs to be done when it finds one. You'll likely want to run the script via a cronjob every few minutes. Quote Link to comment https://forums.phpfreaks.com/topic/88467-email-script/#findComment-452943 Share on other sites More sharing options...
adam84 Posted January 29, 2008 Author Share Posted January 29, 2008 Awesome!!!! Thanks Quote Link to comment https://forums.phpfreaks.com/topic/88467-email-script/#findComment-452947 Share on other sites More sharing options...
TheFilmGod Posted January 29, 2008 Share Posted January 29, 2008 Of course it can be done. You'll more than likely want to write a script that checks your ~/.mailbox directory for new mail, then (depending on what exactly you mean by process) do whatever needs to be done when it finds one. You'll likely want to run the script via a cronjob every few minutes. Agreed, but adding on to that... you should also have the script check the mailbox when you log in to view your email. - Just in case an email came in a few seconds ago and the script wasn't activated yet... Quote Link to comment https://forums.phpfreaks.com/topic/88467-email-script/#findComment-452972 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.