expmail/sender.php

30 lines
585 B
PHP
Raw Permalink Normal View History

2020-09-03 06:31:10 +00:00
<?php
require_once 'config.php';
require_once 'Mail.class.php';
require_once 'Request.class.php';
require_once 'Response.class.php';
2020-09-03 06:31:10 +00:00
function handle_exception($e) {
global $res;
$res->handle_exception($e);
}
2020-09-03 06:31:10 +00:00
function handle_warning($errno, $errstr) {
global $res;
if ($res) {
$res->handle_warning($errstr);
}
}
2020-09-03 06:31:10 +00:00
$res = new Response();
2020-09-03 06:31:10 +00:00
set_exception_handler("handle_exception");
set_error_handler("handle_warning", E_USER_WARNING);
$req = new Request(file_get_contents('php://input'));
$mail = Mail::FromRequest($req);
$mail->send();
$res->respond();