Use PHPMailer for sending mails

Closes: #1

phpcs-errors:226 phpunit-status:successful phpstan-errors:207
This commit is contained in:
Joshua Ramon Enslin 2020-10-21 16:31:30 +02:00 committed by Stefan Rohde-Enslin
parent 90858b9af7
commit 02df42a62d
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
7 changed files with 16 additions and 3 deletions

3
.gitignore vendored
View File

@ -1,6 +1,7 @@
/csv
/cache
/composer.lock
/csv
/conf/MD_CONF_EMAIL.php
/translation-importer
/values/langfiles
*.swp

3
.gitmodules vendored
View File

@ -10,3 +10,6 @@
[submodule "classes/MDTlLoader"]
path = classes/MDTlLoader
url = /var/www/vhosts/museum-digital.de/git-base/MDTlLoader/
[submodule "classes/MDMailer"]
path = classes/MDMailer
url = /var/www/vhosts/museum-digital.de/git-base/MDMailer

@ -1 +1 @@
Subproject commit ef00d81c1d70b9402f22ba00c52bc2fca7a2e8e5
Subproject commit c13d06eccb5127c932e53bc0bbda33810c871d0c

1
classes/MDMailer Submodule

@ -0,0 +1 @@
Subproject commit ae2d83172d8b144e6ec7b031853da7a2ef80a613

View File

@ -1,5 +1,8 @@
{
"require-dev": {
"phpunit/phpunit": "^8.4"
},
"require": {
"phpmailer/phpmailer": "^6.1"
}
}

View File

@ -9,10 +9,14 @@
declare(strict_types = 1);
// Set autoloader
error_reporting(E_ALL);
ini_set('display_errors', "1");
spl_autoload_register("mdCsvxmlAutoloader");
set_exception_handler("mdExceptionHandler");
set_error_handler("mdErrorHandler", E_ALL);
require_once __DIR__ . '/../vendor/autoload.php';
/**
* Autoloader for museum-digital.org.
*
@ -28,6 +32,8 @@ function mdCsvxmlAutoloader(string $className):void {
__DIR__ . "/../classes/MDAllowedValueSets/src",
__DIR__ . "/../classes/MDExportFormats/src",
__DIR__ . "/../classes/MDErrorReporter",
__DIR__ . "/../classes/MDMailer/src",
__DIR__ . "/../conf",
__DIR__ . "/../classes/MDErrorReporter/exceptions/generic",
__DIR__ . "/../classes/MDErrorReporter/exceptions/page",
__DIR__ . "/../classes/MDErrorReporter/exceptions/updates",

View File

@ -34,7 +34,6 @@ $toInject = '
';
echo printHTMLHead($toInject);
echo '
<div class="uploader">