Added Email Logging for Emailnotification class
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user