Answer the question
In order to leave comments, you need to log in
How to execute php script when receiving mail?
There is access to a server on FreeBSD, it has a web server and a mail server.
The task is to execute a ready-made PHP script when receiving a letter to a special mailbox, which sends a GET request with the parameters received in the letter.
The email template with the list of parameters can also be changed (to make it easier to parse the email with parameter values).
Devcot is installed on the server, there are manuals everywhere on the Internet how to do this for Postfix (google query: "php mail processing"), but I don't think I have it installed.
Answer the question
In order to leave comments, you need to log in
In addition to Dovecot, you must have an MTA (Postfix, Exim...) installed. And mail processing happens on MTA. Therefore, Google correctly tells you what to do.
In my case, the option with CRON was the most suitable. I added a check every 5 minutes
and in the script I check mail and perform actions. Start:
I have a time-critical procedure, 5 minutes was enough for me.
PS I'm fetching mail from a third party server.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question