I'm currently trying to use Mailgun's webhooks to retrieve email, but I'm having a few problems.
My PHP code is currently set up to grab any post data and write it to a txt file so I know that everything is definitely working, but nothing shows up.
Here's my PHP code currently...
if(!empty($_POST))
{
$file = fopen('mail.txt','w');
fwrite($file, var_dump($_POST));
fclose($file);
}
Simple enough... I then go into my logs on Mailgun and enter the URL to my code and click test. Mailgun tells me that they have successfully sent a sample request, but every time I go into my mail.txt to check, the file is still empty.
I have changed the permissions of the txt file to 655 to find out if it's anything to do with this, but I still get nothing. I have created a Mailgun bin URL and tested the Webhooks on there and all seems to be working.
Is there anything obvious I'm not doing?