Added Email Logging for Emailnotification class

This commit is contained in:
Frank Schubert
2025-08-22 17:49:54 +02:00
parent 866c3b2ae1
commit 3a86160b38
26 changed files with 1636 additions and 46 deletions

View File

@@ -157,7 +157,7 @@ class Order extends mfBaseModel {
if(!$subject || !$from || !$from_name || !$to) {
$this->log->warn("Service PIN Email not sent. (subject: '$subject', from: '$from_name', from_email: '$from', to: '$to')");
} else {
$email = new Emailnotification();
$email = new Emailnotification("Order", $this->id);
$email->setSubject($subject);
$email->setBody($body);
$email->setFrom($from, $from_name);
@@ -192,7 +192,7 @@ class Order extends mfBaseModel {
return false;
} else {
$email = new Emailnotification();
$email = new Emailnotification("Order", $this->id);
$email->setSubject($subject);
$email->setBody($body);
$email->setFrom($from, $from_name);
@@ -231,7 +231,7 @@ class Order extends mfBaseModel {
$this->log->warn("Internl Billing Email not sent. (subject: '$subject', from: '$from', from_email: '$from_name', to: '$to')");
return false;
} else {
$email = new Emailnotification();
$email = new Emailnotification("Order", $this->id);
$email->setSubject($subject);
$email->setBody($body);
$email->setFrom($from, $from_name);
@@ -263,7 +263,7 @@ class Order extends mfBaseModel {
$this->log->warn("Billing NBE Email not sent. (subject: '$subject', from: '$from', from_email: '$from_name', to: '$to')");
return false;
} else {
$email = new Emailnotification();
$email = new Emailnotification("Order", $this->id);
$email->setSubject($subject);
$email->setBody($body);
$email->setFrom($from, $from_name);
@@ -290,7 +290,7 @@ class Order extends mfBaseModel {
$tk_body = $tk_tpl->render();
$tk_values = $tk_tpl->getReturnedValue();
$tk_email = new Emailnotification();
$tk_email = new Emailnotification("Order", $this->id);
$tk_email->setSubject($tk_values["subject"]);
$tk_email->setBody($tk_body);
$tk_email->setFrom($tk_values["from_email"], $tk_values["from_email_name"]);
@@ -342,7 +342,7 @@ class Order extends mfBaseModel {
$this->log->warning("File (orderfile->id: ".$file->id.") not a valid mimetype: $mimetype");
}
$email = new Emailnotification();
$email = new Emailnotification("Order", $this->id);
$email->setSubject($subject);
$email->setBody($body);
$email->setFrom($from, $from_name);