Add Postmark integration (inbound emails for task creation)

This commit is contained in:
Frederic Guillot
2015-04-19 14:48:12 -04:00
parent 370b5a0fd7
commit 1891e87d03
37 changed files with 478 additions and 6 deletions

View File

@@ -100,4 +100,20 @@ class Webhook extends Base
echo $result ? 'PARSED' : 'IGNORED';
}
/**
* Handle Postmark webhooks
*
* @access public
*/
public function postmark()
{
if ($this->config->get('webhook_token') !== $this->request->getStringParam('token')) {
$this->response->text('Not Authorized', 401);
}
$result = $this->postmarkWebhook->parsePayload($this->request->getJson() ?: array());
echo $result ? 'PARSED' : 'IGNORED';
}
}