Schau dort nochmal die Anleitung zur manuellen Installation genauer an, da steht auch dieser Satz:
„Even if you’re not using exceptions, you do still need to load the Exception class as it is used internally.“
Das dürfte diesen von dir berichteten Fehler erklären: Fatal error: Uncaught Error: Class „PHPMailer\PHPMailer\Exception“ not found in C:\ProgramData\Symcon\scripts\PHPMailer\PHPMailer.php:1615
In der Installationsanleitung steht die Einbindung beschrieben.
Hier nochmal eine kurze Zusammenfassung: Ich hatte bisher zum versenden von E-Mails mit mehr als einem Attachment den PHPMail von hier PHPMailer download | SourceForge.net genutzt, der allerdings seit 2010 nicht mehr weiterentwickelt wird.
Zur Installation unter IPS habe ich im IPS Ordner unter Scripts in einem neuen Unterverzeichnis PHPMailer die folgenden Dateien vom Github Projekt (Link siehe oben) gespeichert.
Der entsprechende Code zur Nutzung sieht wie folgt aus, wobei das bei mir mit einer E-Mail von IONOS läuft.
//Import the PHPMailer class into the global namespace
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
require("./PHPMailer/PHPMailer.php");
require("./PHPMailer/SMTP.php");
require("./PHPMailer/Exception.php");
// KONFIGURATION VON KONSTANTEN
include ("27397.ips.php");
try {
$mail = new PHPMailer();
$mail->isSMTP();
$mail->SMTPDebug = SMTP::DEBUG_OFF;
$mail->Host = 'smtp.xyz.de';
$mail->Port = 465;
$mail->SMTPAuth = true;
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
$mail->Username = 'a@b.de';
$mail->Password = 'xyz';
$mail->setFrom('a@b.de', 'XYZ INFO');
$mail->addReplyTo('a@b.de', 'XYZ INFO');
$mail->addAddress('a@b.de', 'XYZ INFO');
$mail->Subject = 'XYZ INFO MAIL';
$mail->msgHTML('E-Mail Text gif. in HTML formatiert');
// CAMS_HOME_DIR in KONFIGURATION definiert
$mail->addAttachment(CAMS_HOME_DIR . '01234.jpg');
$mail->addAttachment(CAMS_HOME_DIR . '12345.jpg');
if (!$mail->send()) {
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo 'Message sent!';
}
} catch (Exception $e) {
echo $e->errorMessage();
} catch (\Exception $e) {
echo $e->getMessage();
}
}