How can I parse the email using Mailgun?

Question!

by refering this article, I tried to parse the email, but i am failing to do it.

I have created free-account on mailgun, created domain, mailbox, etc. I sent one mail from my personal email ID to say, [email protected]_domain_name.mailgun.com

I have configured the account to forward all mails to "http://project_name/controller_name/action_name" (in case of zend) OR

"http://localhost/project_name/file_name.php" (for plain PHP)

It is said that I can access the mail using $_POST (for PHP), but I am getting blank array.

Where I am going wrong ?

I tried with both Zend and plain PHP. I am simply using print_r($_POST).



Answers

Mailgun cannot POST messages to localhost .U need to migrate your project to an online server.right now, the route you have provided is of your localhost server,there is no way for mailgun to access that .



This video can help you solving your question :)
By: admin