Okay, so as a kind of proof of concept, I am trying to set up a mail server to send emails to a PHP script. It's important that the attachments can be accessed, preferably in the same way file uploads from a basic web upload are accessed.
One of the largest problems is I don't even know where to start, I have never attempted anything complex regarding mail servers.
To clarify exactly what I want to know: is there a way that, if someone sends an email to example@example.com, a PHP script would run and have access to the emails content including headers and attachments? If so, could you also point me in the right direction to learn more?
Thank you