diff --git a/.gitignore b/.gitignore index ccfdfa4..47283ba 100755 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,5 @@ error.log /python/update.sh !/html/composer.json /html/composer.lock -/html/vendor/ .DS_STORE .env \ No newline at end of file diff --git a/html/api/mail.php b/html/api/mail.php deleted file mode 100755 index dc05804..0000000 --- a/html/api/mail.php +++ /dev/null @@ -1,47 +0,0 @@ -SMTPDebug = 0; // Prevents debugging - $mail->isSMTP(); // Enables SMTP - // Gets the smtp server data - $jsonInfo = file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/config.json"); - $jsonData = json_decode($jsonInfo, true); - $mail->Host = $jsonData["mail"]["server"]; // Specify SMTP server - $mail->SMTPAuth = true; // Enable SMTP authentication - $mail->Username = $jsonData["mail"]["username"]; // SMTP username - $mail->Password = $jsonData["mail"]["password"]; // SMTP password - $mail->SMTPSecure = 'tls';//PHPMailer::ENCRYPTION_STARTTLS; Enable TLS encryption, `PHPMailer::ENCRYPTION_SMTPS` also accepted - $mail->Port = $jsonData["mail"]["port"]; // TCP port to connect to - // Message content - $mail->isHTML(true); // Set email format to HTML - $mail->Subject = $OGPOST["subject"]; // The subject - $mail->Body = $OGPOST["body"]; // The body of the email - - // Recipients - if (array_key_exists("senderName", $OGPOST)) { // Who to send it from. This will check if a short name was given - $mail->setFrom($OGPOST["sender"], $OGPOST["senderName"]); - } else { - $mail->setFrom($OGPOST["sender"]); - } - $mail->addAddress($OGPOST["mail"]); // Add a recipient - $mail->send(); - echo "sent email"; - $sender = $_POST["sender"]; - $reciever = $_POST["mail"]; - writeLog(29, "Sent email from $sender to $reciever with user $USERNAME and ip $address"); - } catch (Exception $e) { // Used to make sure errors are reported - http_response_code(500); - echo $e->errorMessage(); - } -} else { - http_response_code(400); - echo "Invalid command"; -} \ No newline at end of file diff --git a/html/composer.json b/html/composer.json deleted file mode 100755 index 5696ee3..0000000 --- a/html/composer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "require": { - "phpmailer/phpmailer": "6.8.*" - } -} diff --git a/html/email/index.js b/html/email/index.js deleted file mode 100755 index 1ae843e..0000000 --- a/html/email/index.js +++ /dev/null @@ -1,47 +0,0 @@ -function render() { - // Explanation of how this securly renders the untrusted html input. - // https://making.close.com/posts/rendering-untrusted-html-email-safely - - $("#render").attr("srcdoc", ` - - -
- - - - -Warning do not paste unsafe input into the textbox below
- -