Make mail transports pluggable and move integrations to plugins

- Postmark: https://github.com/kanboard/plugin-postmark
- Mailgun: https://github.com/kanboard/plugin-mailgun
- Sendgrid: https://github.com/kanboard/plugin-sendgrid
This commit is contained in:
Frederic Guillot
2015-10-16 20:50:12 -04:00
parent 9c9ed02cd7
commit f99a3c501f
55 changed files with 652 additions and 1457 deletions

View File

@@ -92,37 +92,4 @@ class Webhook extends Base
echo $result ? 'PARSED' : 'IGNORED';
}
/**
* Handle Postmark webhooks
*
* @access public
*/
public function postmark()
{
$this->checkWebhookToken();
echo $this->postmark->receiveEmail($this->request->getJson()) ? 'PARSED' : 'IGNORED';
}
/**
* Handle Mailgun webhooks
*
* @access public
*/
public function mailgun()
{
$this->checkWebhookToken();
echo $this->mailgun->receiveEmail($_POST) ? 'PARSED' : 'IGNORED';
}
/**
* Handle Sendgrid webhooks
*
* @access public
*/
public function sendgrid()
{
$this->checkWebhookToken();
echo $this->sendgrid->receiveEmail($_POST) ? 'PARSED' : 'IGNORED';
}
}