I'm using Mailgun to receive emails for my web app developed using Codeigniter. Mailgun makes a http post to the following (http://something.com/email) url for every incoming email.
I get the contents of the email with the following code.
function email_to_db(){
$email_body = $this->input->post('body-plain', '');
$email_sender = $this->input->post('sender');
}
However I'm not able to fetch the attachments.
Can someone guide me on how I can achieve this. Following is the link to my reference doc.