Add Sendgrid integration (incoming email handling)

This commit is contained in:
Frederic Guillot
2015-04-19 19:23:42 -04:00
parent ac86c3100a
commit f190be9e2d
37 changed files with 380 additions and 89 deletions

View File

@@ -128,4 +128,18 @@ class Webhook extends Base
echo $this->mailgunWebhook->parsePayload($_POST) ? 'PARSED' : 'IGNORED';
}
/**
* Handle Sendgrid webhooks
*
* @access public
*/
public function sendgrid()
{
if ($this->config->get('webhook_token') !== $this->request->getStringParam('token')) {
$this->response->text('Not Authorized', 401);
}
echo $this->sendgridWebhook->parsePayload($_POST) ? 'PARSED' : 'IGNORED';
}
}