-1

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

user3887706
  • 23
  • 1
  • 3

1 Answers1

0

Assuming you're not planning to write a mail server using PHP, you will need to integrate with an existing mail server. I don't have experience with that but one thing you could look into is using AWS SES. It is possible to receive emails at AWS SES and then have them processed in various ways (e.g. stored in AWS S3). Then they can also be accessed by a PHP script using AWS API (AWS offers a really good PHP SDK that makes it quite easy to access all of their services).

Read some more here: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html

obe
  • 7,378
  • 5
  • 31
  • 40