I need to build an email parsing script which would parse emails that would come into an inbox and dump the contents into a database, while at the same time make a curl request with details parsed from the email.
At this moment I'm quite stuck on implementing the part on how to parse emails in realtime as they are recieved in the inbox. Is there a way to set triggers to do something like this? I've extensive experience with working with php based webmail clients but this seems different though.
How can this be accomplished - I am assuming a cron job but if theres another way to do so I'm all ears.