I am mostly familiar with PHP / MySQL but I am thinking I may not be able to do this functionality with that. I have multiple people in my office who would like to receive leads. To do this fairly I want to automate the leads to each person so everyone gets an equal share. So lets say there are three agents, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org.
Definition of a lead in this case is a consumer emailing a request for a produce or service.
I want to have a general email such as email@example.com and have all leads go to this email. I would like to be able to either reroute the specific email to whoever's turn it is. Lead 1 goes to agent1..., lead 2 goes to agent2..., lead 3 goes to agent3, lead 4 goes back to agent1... and so on.
Keep in mind that I don't have control over all the forms of the lead because some are coming from third parties.
Is there a way I can use php MySql to access an email and either reroute it through the mail function or possibly even extract the data from the email and send through a mail function.
If PHP can not accomplish this, any suggestions on what direction to look at.