Update api.mailgun.php

This commit is contained in:
Namhyeon Go 2019-04-15 16:21:35 +09:00 committed by GitHub
parent 2769bab7aa
commit 3438a0d16e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,10 @@
<?php
/**
* @file api.mailgun.php
* @date 2019-04-15
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Mailgun API controller
*/
loadHelper("mailgun.api");
@ -6,3 +12,7 @@ $content = get_requested_value("content", array("_JSON", "_ALL"));
$subject = get_requested_value("subject", array("_JSON", "_ALL"));
$to = get_requested_value("to", array("_JSON", "_ALL"));
$response = mailgun_send_message($content, $to, $subject);
header("Content-Type: application/json");
echo json_encode($response);