Resend data obtained with Stream to another PHP server

50 Views Asked by At

I have a mail server with EXIM responsible for receiving emails and sending their content to be read and treated by a PHP file. This content reading occurs through the command fopen("php://stdin", "r"), from that moment on I perform some actions using a library that allows extracting email from sender, subject, message content, attachments, etc.

My problem is that I will have to migrate this heavy part of email handling to another server, for infrastructure reasons. I'll just keep the main SMTP Server+PHP file that performs the fopen, and after that I must transfer all its content to another server on another hosting.

My main question is, is there any way to call the new PHP server which will be responsible for handling the email from what I got from the initial read file and sending the content as obtained with php://stdin in a single part? Similar to the first mode I received?

0

There are 0 best solutions below