Few days ago, I was looking for a script for my CRM (Customer Relationship Management) software that will simply forward all the emails received at a common address to their respective sales agent.
After few hrs I had successfully managed to write this script using PHP
In this script i am using PHPMAILER class in order to send emails and imap utility to fetch and read emails